From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48670 invoked by alias); 24 May 2017 07:02:17 -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 48637 invoked by uid 89); 24 May 2017 07:02:14 -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=Hx-languages-length:4330 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; Wed, 24 May 2017 07:02:12 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dDQJA-0003rV-T0 from Thomas_Schwinge@mentor.com ; Wed, 24 May 2017 00:02:13 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.87) by svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 24 May 2017 08:02:09 +0100 From: Thomas Schwinge To: Jakub Jelinek , Subject: Re: libgomp nvptx plugin: Debugging output for cuInit failure In-Reply-To: <20170523104105.GP8499@tucnak> References: <87efvhyrpn.fsf@hertz.schwinge.homeip.net> <20170523104105.GP8499@tucnak> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 24 May 2017 07:15:00 -0000 Message-ID: <8760gqybys.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-02.mgc.mentorg.com (139.181.222.2) X-SW-Source: 2017-05/txt/msg01822.txt.bz2 Hi! On Tue, 23 May 2017 12:41:05 +0200, Jakub Jelinek wrote: > On Mon, May 22, 2017 at 02:57:24PM +0200, Thomas Schwinge wrote: > > libgomp nvptx plugin: Debugging output for cuInit failure > Ok. Thanks. As posted, just with better ChangeLog committed to trunk in r248400: commit d5f081f8cfa23d74aec1cea4dd4ae3061c4498c8 Author: tschwinge Date: Wed May 24 06:59:05 2017 +0000 libgomp nvptx plugin: Debugging output when disabling nvptx offloading =20=20=20=20 libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging outp= ut when disabling nvptx offloading. =20=20=20=20 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248400 138bc75d-0d04-04= 10-961f-82ee72b054a4 --- libgomp/ChangeLog | 5 +++++ libgomp/plugin/plugin-nvptx.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git libgomp/ChangeLog libgomp/ChangeLog index 32f8bf1..14e95ef 100644 --- libgomp/ChangeLog +++ libgomp/ChangeLog @@ -1,3 +1,8 @@ +2017-05-24 Thomas Schwinge + + * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output + when disabling nvptx offloading. + 2017-05-23 Thomas Schwinge =20 * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Update. 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); Committed to gomp-4_0-branch in r248401: commit e526e3776c9995e60927d8d75e9a2b2120702f57 Author: tschwinge Date: Wed May 24 07:00:04 2017 +0000 libgomp nvptx plugin: Debugging output when disabling nvptx offloading =20=20=20=20 libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging outp= ut when disabling nvptx offloading. =20=20=20=20 trunk r248400 =20=20=20=20 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@2484= 01 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 5 +++++ libgomp/plugin/plugin-nvptx.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 996c1f9..15e0c58 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,8 @@ +2017-05-24 Thomas Schwinge + + * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output + when disabling nvptx offloading. + 2017-05-17 Thomas Schwinge =20 * libgomp.texi (OpenACC Profiling Interface): Update. diff --git libgomp/plugin/plugin-nvptx.c libgomp/plugin/plugin-nvptx.c index a9d1f16..7bbaca5 100644 --- libgomp/plugin/plugin-nvptx.c +++ libgomp/plugin/plugin-nvptx.c @@ -807,7 +807,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 @@ -819,7 +823,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