From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103426 invoked by alias); 22 May 2017 12:57:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 103410 invoked by uid 89); 22 May 2017 12:57:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=schwinge, Schwinge, Dec X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 May 2017 12:57:30 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-03.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dCmtv-0002qF-2E from Thomas_Schwinge@mentor.com ; Mon, 22 May 2017 05:57:31 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.87) by SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 22 May 2017 13:57:28 +0100 From: Thomas Schwinge To: , Jakub Jelinek Subject: libgomp nvptx plugin: Debugging output for cuInit failure User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 22 May 2017 13:01:00 -0000 Message-ID: <87efvhyrpn.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) X-SW-Source: 2017-05/txt/msg01670.txt.bz2 Hi! OK for trunk? commit 7b2f06b7d2fd23b20d81fda8be6ec7453e8b3fe3 Author: Thomas Schwinge Date: Thu Dec 22 08:30:04 2016 +0100 libgomp nvptx plugin: Debugging output for cuInit failure =20=20=20=20 libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging outp= ut for cuInit failure. --- libgomp/plugin/plugin-nvptx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git libgomp/plugin/plugin-nvptx.c libgomp/plugin/plugin-nvptx.c index 3ef48dd..0e1b3e2 100644 --- libgomp/plugin/plugin-nvptx.c +++ libgomp/plugin/plugin-nvptx.c @@ -838,7 +838,11 @@ nvptx_get_num_devices (void) /* PR libgomp/65099: Currently, we only support offloading in 64-bit configurations. */ if (sizeof (void *) !=3D 8) - return 0; + { + GOMP_PLUGIN_debug (0, "Disabling nvptx offloading;" + " only 64-bit configurations are supported\n"); + return 0; + } =20 /* This function will be called before the plugin has been initialized in order to enumerate available devices, but CUDA API routines can't be = used @@ -852,7 +856,11 @@ nvptx_get_num_devices (void) /* This is not an error: e.g. we may have CUDA libraries installed b= ut no devices available. */ if (r !=3D CUDA_SUCCESS) - return 0; + { + GOMP_PLUGIN_debug (0, "Disabling nvptx offloading; cuInit: %s\n", + cuda_error (r)); + return 0; + } } =20 CUDA_CALL_ERET (-1, cuDeviceGetCount, &n); Gr=C3=BC=C3=9Fe Thomas