From patchwork Fri Nov 22 16:11:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kwok Cheung Yeung X-Patchwork-Id: 1199535 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=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-514410-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ivpCJ0Qa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UtEJFE+O"; 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 47KLyw4zf6z9sPK for ; Sat, 23 Nov 2019 03:11:36 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=G09jjFANXNmNDE3Q 7iT1guCY3UOkVSNrLr1SVVJyHh+yGgiQti/73U+2xLUq/RNI9G6Tq0vyAm0B3qBA CVDSoS5clbKB2u8zFc60IIMVaRLlh9hKC1lDCgaXFZG9+ANOYe5XFLJY+CCSMmvC yP2OC/5WwJUTPajcbkshEXeO06w= 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:from :subject:to:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=C4dLCgXbeTBkft5WvGu9AI XxFLY=; b=ivpCJ0QaqgkKt0GXy8qKCD+losr4xXmrQPffom5xbHcbX/GLVvPdzI mV3N+CCUiR7AWZFkqhTmaJY+wf0OEIRu4nuUDw4gMuu2eyOBNfjJNXnvN25CVn/c uyxNde5iUzFgJAWdlMXIHQmH+hN513LjSVbDEBx20vJEAVCJ6UR7A= Received: (qmail 45771 invoked by alias); 22 Nov 2019 16:11:29 -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 45763 invoked by uid 89); 22 Nov 2019 16:11:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*UA:x64, H*UA:Win64, Cheung, kcy@codesourcery.com X-HELO: mail-wm1-f48.google.com Received: from mail-wm1-f48.google.com (HELO mail-wm1-f48.google.com) (209.85.128.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Nov 2019 16:11:27 +0000 Received: by mail-wm1-f48.google.com with SMTP id x26so7734050wmk.4 for ; Fri, 22 Nov 2019 08:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=RKmY1LKT/ZMTPzz1TxlyqxLe8ERMHoMbdfoLPCMfLic=; b=UtEJFE+Od8EDSRThuwia2rneqlO2My1uT+Itd88+sTekPuCPq5ToiDYXk7BGxON+Jr IvAsYNJubcZje+vA2yXs3TlBoKOthXI7Z8f4jf1fgrgc6MN19q/FpcyYGPouMSo3OiBp /4kBBqbRKMOLsyTcYxXCdQautMXoAuYbezQ6m28j/62gh9w+BhHtEfUD5gOuDtPRzN8k B0WD+yt0Wui46lfbnxgZ+yQR9e3FA859z04tIcZmqciqdIBb/BzjwY7i1tB3mOCJgklO owpzp7R2hfvJ/xeQroKS2gMSJvOBZUCul31OHUrvudgxNMyGSLYyMuFbjuIfHu+TFiGU 5ksQ== Received: from ?IPv6:2a02:8011:4012:2:15a5:779a:6ba:6153? ([2a02:8011:4012:2:15a5:779a:6ba:6153]) by smtp.gmail.com with ESMTPSA id e16sm8388261wrj.80.2019.11.22.08.11.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Nov 2019 08:11:23 -0800 (PST) From: Kwok Cheung Yeung Subject: [PATCH] [og9] Fix libgomp.oacc-fortran/lib-16.f90 test To: Julian Brown , gcc-patches@gcc.gnu.org Message-ID: <34e3c3d6-2213-8bb0-693a-1b71b1998ee5@gmail.com> Date: Fri, 22 Nov 2019 16:11:15 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 libgomp.oacc-fortran/lib-16.f90 in the libgomp testsuite currently fails with: Program aborted. Backtrace: #0 0x4013bf in MAIN__ at src/gcc-gcn-master/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90:28 #1 0x4013bf in main at src/gcc-gcn-master/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90:6 In commit 3a25e449d04d5768c3a799264ba0e5cab8ae181f ([og9] Fix OpenACC "ephemeral" asynchronous host-to-device copies), lib-16-2.f90 has two acc_waits added to wait for an asynchronous update to complete before operating on the data. Since lib-16-2.f90 is supposed to be identical to lib-16.f90 except for using 'include "openacc_lib.h"' instead of 'use openacc', any changes to lib-16-2.f90 should also apply to lib-16.f90. When the changes are applied to lib-16.f90, the test passes. Okay to commit to OG9? Thanks Kwok 2019-11-22 Kwok Cheung Yeung libgomp/ * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue. diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 index 011f9cf..5e01099 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 @@ -27,6 +27,9 @@ program main if (acc_is_present (h) .neqv. .TRUE.) call abort + ! We must wait for the update to be done. + call acc_wait (async) + h(:) = 0 call acc_copyout_async (h, sizeof (h), async) @@ -45,6 +48,8 @@ program main if (acc_is_present (h) .neqv. .TRUE.) call abort + call acc_wait (async) + do i = 1, N if (h(i) /= i + i) call abort end do