From patchwork Fri Oct 9 15:11:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 528244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 1F2EA140321 for ; Sat, 10 Oct 2015 02:12:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=e0LzVSs7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=AOXznHMNH/grwgal Rv4AlvJ+DOqfzj1Via9Trsz9FFqekugS124d+9hHehEkDFqEyNn+7fb//VsQHHrx MrrOy1dov4a5uYCuSpc7ytfuEqCANXgD5CE5ibLMuElvXYozPfbNGe3l3RIU9HlA 2+gSJEsiTO4sq9pU8iPpG28vbQ0= 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 :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=rcHTR2AZG9PPxuhxT/e2eM qb+Zs=; b=e0LzVSs7/Z1MFxuJmqJFDgwbdjKj19fQU614ywJ+0Xmyeq6LPspiRg 66xzBx4+kwrNt30PGRehrwpUNf9Qz9pWSsDyCGu6CS1SRBAUstzd5CtaL1+/s1+o 30FCiKR6f87UWJT8nRUfJvTphBpKQsrOsc0e6D09Hx6b5ZzvJBV9g= Received: (qmail 102386 invoked by alias); 9 Oct 2015 15:12:09 -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 101770 invoked by uid 89); 9 Oct 2015 15:12:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 09 Oct 2015 15:12:06 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39507) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZkZL1-0002dh-KL for gcc-patches@gnu.org; Fri, 09 Oct 2015 11:12:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkZKw-0006a5-DP for gcc-patches@gnu.org; Fri, 09 Oct 2015 11:12:03 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:34634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkZKw-0006Zl-4h for gcc-patches@gnu.org; Fri, 09 Oct 2015 11:11:58 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZkZKr-0004k5-5U from Thomas_Schwinge@mentor.com ; Fri, 09 Oct 2015 08:11:53 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Fri, 9 Oct 2015 16:11:52 +0100 From: Thomas Schwinge To: "gcc-patches@gnu.org" , Jakub Jelinek CC: Subject: libgomp testsuite: Remove some explicit acc_device_nvidia usage In-Reply-To: <87wpxsz26d.fsf@schwinge.name> References: <5593CBFE.8070609@mentor.com> <87380g1cwe.fsf@schwinge.name> <87wpxsz26d.fsf@schwinge.name> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Fri, 9 Oct 2015 17:11:39 +0200 Message-ID: <87lhbcm5zo.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi! On Wed, 22 Jul 2015 16:39:54 +0200, I wrote: > [...] cleanup; committed to > gomp-4_0-branch in r226072: [...] OK for trunk? commit a8bd7234d7b6b0111a1e3b3dc032ea5eead7e258 Author: Thomas Schwinge Date: Fri Oct 9 16:40:56 2015 +0200 libgomp testsuite: Remove some explicit acc_device_nvidia usage. libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit acc_device_nvidia usage. * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise. --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c | 14 ++------------ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c | 9 +-------- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c | 17 +++-------------- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c | 14 ++++++-------- 4 files changed, 12 insertions(+), 42 deletions(-) Grüße, Thomas diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c index 26318f1..8ed743d 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c @@ -6,19 +6,9 @@ int main (int argc, char **argv) { - acc_device_t devtype = acc_device_host; - -#if ACC_DEVICE_TYPE_nvidia - devtype = acc_device_nvidia; - - if (acc_get_num_devices (devtype) == 0) - return 0; -#endif - - acc_init (devtype); - + acc_init (acc_device_default); fprintf (stderr, "CheCKpOInT\n"); - acc_init (devtype); + acc_init (acc_device_default); return 0; } diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c index cf1af8c..55054c0 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c @@ -7,14 +7,7 @@ int main (int argc, char **argv) { void *d; - acc_device_t devtype = acc_device_host; - -#if ACC_DEVICE_TYPE_nvidia - devtype = acc_device_nvidia; - - if (acc_get_num_devices (acc_device_nvidia) == 0) - return 0; -#endif + acc_device_t devtype = acc_device_default; acc_init (devtype); diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c index c658dd6..353cd1c 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c @@ -6,21 +6,10 @@ int main (int argc, char **argv) { - acc_device_t devtype = acc_device_host; - -#if ACC_DEVICE_TYPE_nvidia - devtype = acc_device_nvidia; - - if (acc_get_num_devices (acc_device_nvidia) == 0) - return 0; -#endif - - acc_init (devtype); - - acc_shutdown (devtype); - + acc_init (acc_device_default); + acc_shutdown (acc_device_default); fprintf (stderr, "CheCKpOInT\n"); - acc_shutdown (devtype); + acc_shutdown (acc_device_default); return 0; } diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c index a4cf7f2..5dce9b8 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c @@ -9,18 +9,17 @@ main (int argc, char **argv) int i; int num_devices; int devnum; - acc_device_t devtype = acc_device_host; - -#if ACC_DEVICE_TYPE_nvidia - devtype = acc_device_nvidia; -#endif + acc_device_t devtype = acc_device_default; num_devices = acc_get_num_devices (devtype); if (num_devices == 0) - return 0; + abort (); acc_init (devtype); + if (num_devices != acc_get_num_devices (devtype)) + abort (); + for (i = 0; i < num_devices; i++) { acc_set_device_num (i, devtype); @@ -31,8 +30,7 @@ main (int argc, char **argv) acc_shutdown (devtype); - num_devices = acc_get_num_devices (devtype); - if (num_devices == 0) + if (num_devices != acc_get_num_devices (devtype)) abort (); for (i = 0; i < num_devices; i++)