From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id C8BF3385BF9C for ; Thu, 2 Dec 2021 08:37:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8BF3385BF9C 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: uYoUG6FtBUlPgjUWv+6s60xxSRlePQwSoCmrmIqMNY8ikwR0q3Q7w8soNRX9kWKMxr76qkgeSE dcw9YDMbcrNxn2hevZis6PmbNClZ2zKi4pba2fpEgvdcQOn91EcnIF60iBdvTt1IAgSKrvL9ek PbFVVuqT3/5wcyfDGs4CTP8WYsZ8gwvHYyu9FGY7iIk5wt/rmAaZPtWxRsaIQZ3EJAOi9ySU+T 37/UaB7Gwdh49ObH3h0ROAnlMmnK6y4uXwGcpeeY1Ff7NvnlTpApe0V4915C6R20JkttmzuQ2s tP8nmpvpFkxbtEgzak6jAoXb X-IronPort-AV: E=Sophos;i="5.87,281,1631606400"; d="scan'208";a="69189747" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 02 Dec 2021 00:37:27 -0800 IronPort-SDR: wuvD+ehME/fDNbcT6MyCOIJ8VIdlvhd9acA+zK7ktmYfa1ru7T3Wqhj4BXiOGG60Kl5+V1e0Uu bHDmV3kGvUFEP0HL7LMXXVJvm8i/kL79RFPTqgfgiWhEzQmfEOjuHRAAQq0WyWxvwRW8oM7uE3 tglvkzl4ZoDTBOHuZ/SR3IWomDB27e7DkSz14vF7xS8ACupz8c1Ha7Mt4mKS8Apkf0XejoYeX+ XRzX/6DyOQatbPD9tjbLGYqv1v4GEPXcEpDMB2o5MFf1wVJjeEnbIxwFnsg9avFHTkj+5QGf52 WSI= Message-ID: <0795356f-c6bb-7b85-3d1f-71987be699c0@codesourcery.com> Date: Thu, 2 Dec 2021 09:37:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: GNU OMPD implementation Content-Language: en-US To: Martin Jambor , Mohamed Atef CC: , References: From: Tobias Burnus In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2021 08:37:30 -0000 Hi, On 01.12.21 19:35, Martin Jambor wrote: > On Tue, Nov 30 2021, Mohamed Atef wrote: >> Where is the variable of the OpenMP version defined? The GCC code itself does not make a difference, contrary to C/C++/Fortran which have -std=3D.... OpenMP 4.5 (also known as 201511) is fully supported (minus bugs). Thus, that's the version number (201511) reported to the user. For Fortran, the 'openmp_version' parameter in the module 'omp_lib' and in omp_lib.h come from libgomp/omp_lib.f90.in and libgomp/omp_lib.h.in. For C/C++ (or Fortran with -cpp for the preprocessor), the value is in _OPENMP and is defined in gcc/c-family/c-cppbuiltin.c. However, while GCC only claims 4.5/201511 support, OpenMP 5.0 and 5.1 are partially implemented, cf. https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Implementation-Status.html Thus, when a later version of the spec changed behavior, GCC might not have 4.5 semantic but 5.0, 5.1 or even 5.2 (or later) semantic. This happens either when implementing a 5.x feature or when a bug in the spec was found which has then be fixed. For completeness, for exported symbols in libgomp, some versioning exists, cf. libgomp/libgomp.map. Thanks for working on OMPD! Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955