From patchwork Wed Jun 14 10:58:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1794913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qh2Tv1WTzz20Vx for ; Wed, 14 Jun 2023 20:58:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB9183858031 for ; Wed, 14 Jun 2023 10:58:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id A18E73858D1E for ; Wed, 14 Jun 2023 10:58:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A18E73858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,242,1681200000"; d="scan'208,223";a="8779802" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 14 Jun 2023 02:58:27 -0800 IronPort-SDR: f2kKDq408D9uyuntYQIXoUvhr9nuNwt442wFGtledXa7hoJvFi2NNqCRZBqhyhjpxstvLraT1T jTgnzyGypPK5RmLVnP0Ns836FfdorwVXoOjC+IO0E9sdArsejqBoLt4YMmAC7cqwC4bfNt3H5h 15kdObwgJ+wwihfJJGyfL91eLIrmP8d59AbNSCK3lbL4SrPTGxFuO7Y9M5dslhST4yMv/YQHLd DKOjcqoCGVVcP/D3BWv1kklL9jFjmCfviarHuHayPTywrt/pWVN1id7UJKWctzQQxTAZYf+TuY cfU= From: Thomas Schwinge To: Tobias Burnus , Subject: Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others (was: Fix typo in 'libgomp.c/target-51.c' (was: [patch] OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory)) In-Reply-To: <797c2a73-46e5-65f2-7098-a2ed59f6c90d@codesourcery.com> References: <1487d7d4-8611-0d78-6bf2-9bffdd4daa64@codesourcery.com> <87pm5y31p6.fsf@euler.schwinge.homeip.net> <797c2a73-46e5-65f2-7098-a2ed59f6c90d@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Wed, 14 Jun 2023 12:58:20 +0200 Message-ID: <87a5x2wbsj.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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! On 2023-06-14T11:42:22+0200, Tobias Burnus wrote: > On 14.06.23 10:09, Thomas Schwinge wrote: >> Let me know if I should also adjust the new 'target { ! offload_device }' >> diagnostic "[...] MANDATORY but only the host device is available" to >> include a comma before 'but', for consistency with the other existing >> diagnostics (cited above)? > > I think it makes sense to be consistent. Thus: Yes, please add the commas. I've pushed commit f2ef1dabbc18eb6efc0eb47bbb0eebbc6d72e09e "Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others", see attached. Grüße Thomas ----------------- 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 From f2ef1dabbc18eb6efc0eb47bbb0eebbc6d72e09e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 14 Jun 2023 12:44:05 +0200 Subject: [PATCH] Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others On 2023-06-14T11:42:22+0200, Tobias Burnus wrote: > On 14.06.23 10:09, Thomas Schwinge wrote: >> Let me know if I should also adjust the new 'target { ! offload_device }' >> diagnostic "[...] MANDATORY but only the host device is available" to >> include a comma before 'but', for consistency with the other existing >> diagnostics (cited above)? > > I think it makes sense to be consistent. Thus: Yes, please add the commas. Fix-up for recent commit 18c8b56c7d67a9e37acf28822587786f0fc0efbc "OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory". libgomp/ * target.c (resolve_device): Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others. * testsuite/libgomp.c/target-51.c: Adjust. --- libgomp/target.c | 4 ++-- libgomp/testsuite/libgomp.c/target-51.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgomp/target.c b/libgomp/target.c index f1020fad601b..e39ef8f6e82a 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -152,8 +152,8 @@ resolve_device (int device_id, bool remapped) return NULL; if (gomp_target_offload_var == GOMP_TARGET_OFFLOAD_MANDATORY && gomp_get_num_devices () == 0) - gomp_fatal ("OMP_TARGET_OFFLOAD is set to MANDATORY but only the host " - "device is available"); + gomp_fatal ("OMP_TARGET_OFFLOAD is set to MANDATORY, " + "but only the host device is available"); else if (device_id == omp_invalid_device) gomp_fatal ("omp_invalid_device encountered"); else if (gomp_target_offload_var == GOMP_TARGET_OFFLOAD_MANDATORY) diff --git a/libgomp/testsuite/libgomp.c/target-51.c b/libgomp/testsuite/libgomp.c/target-51.c index cf9e690263e9..bbe9ade6e24b 100644 --- a/libgomp/testsuite/libgomp.c/target-51.c +++ b/libgomp/testsuite/libgomp.c/target-51.c @@ -9,7 +9,7 @@ /* See comment in target-50.c/target-50.c for why the output differs. */ -/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY but only the host device is available.*" { target { ! offload_device } } } */ +/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available.*" { target { ! offload_device } } } */ /* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*" { target offload_device } } */ int -- 2.39.2