From patchwork Tue Feb 1 07:20:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 1587102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=nia/Ry8S; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JnxFc294fz9s9c for ; Tue, 1 Feb 2022 18:21:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 51ED83858D35 for ; Tue, 1 Feb 2022 07:21:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51ED83858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1643700113; bh=5vMaNbOlEjxuF9t97N28Lkr2pk3RrAhaHXw9XpLEprk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=nia/Ry8SyWqQrOjIbnEXS3Ik9KRk8Qdaf65IP5WlLVSXOhpU+x4+4iUuE++ANvWIA KJvaf7amt9LhdN/v0e2FOcvg+DygECn7Y8tcfgVs9NII0e8J3A482Eyx1p6n6BmUHU hVxcoex7r3kOpoRQNYvcxfI7wC2MsdNNF1OC/8h4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 9EA6A3858C27 for ; Tue, 1 Feb 2022 07:20:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9EA6A3858C27 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 807EE21101; Tue, 1 Feb 2022 07:20:41 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 672CB13CE4; Tue, 1 Feb 2022 07:20:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rOv5F0nf+GGGMgAAMHmgww (envelope-from ); Tue, 01 Feb 2022 07:20:41 +0000 Date: Tue, 1 Feb 2022 08:20:39 +0100 To: gcc-patches@gcc.gnu.org Subject: [committed][libgomp, testsuite] Reduce recursion depth in declare_target-*.f90 Message-ID: <20220201072037.GA6609@delia.home> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-Patchwork-Original-From: Tom de Vries via Gcc-patches From: Tom de Vries Reply-To: Tom de Vries Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, When running the libgomp testsuite with GOMP_NVPTX_JIT=-O0 using an nvptx accelerator (Nvidia T400, 2GB), I run into: ... libgomp: cuCtxSynchronize error: unspecified launch failure \ (perhaps abort was called) libgomp: cuMemFree_v2 error: unspecified launch failure libgomp: device finalization failed FAIL: libgomp.fortran/examples-4/declare_target-1.f90 -O0 execution test ... The test-case contains: ... ! Reduced from 25 to 23, otherwise execution runs out of thread stack on ! Nvidia Titan V. if (fib (23) /= fib_wrapper (23)) stop 2 ... Fix this by reducing the fib/fib_wrapper argument from 23 to 22. Same for declare_target-2.f90. Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [libgomp, testsuite] Reduce recursion depth in declare_target-*.f90 libgomp/ChangeLog: 2022-01-27 Tom de Vries * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce recursion depth. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same. --- libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 | 4 +++- libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 index e439fe1b738..b761979ecde 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 @@ -29,5 +29,7 @@ program e_53_1 if (fib (15) /= fib_wrapper (15)) stop 1 ! Reduced from 25 to 23, otherwise execution runs out of thread stack on ! Nvidia Titan V. - if (fib (23) /= fib_wrapper (23)) stop 2 + ! Reduced from 23 to 22, otherwise execution runs out of thread stack on + ! Nvidia T400 (2GB variant), when run with GOMP_NVPTX_JIT=-O0. + if (fib (22) /= fib_wrapper (22)) stop 2 end program diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 index ee582b21632..f576c25ba39 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 @@ -6,9 +6,11 @@ program e_53_2 !$omp target map(from: x) ! Reduced from 25 to 23, otherwise execution runs out of thread stack on ! Nvidia Titan V. - x = fib (23) + ! Reduced from 23 to 22, otherwise execution runs out of thread stack on + ! Nvidia T400 (2GB variant), when run with GOMP_NVPTX_JIT=-O0. + x = fib (22) !$omp end target - if (x /= fib (23)) stop 1 + if (x /= fib (22)) stop 1 end program integer recursive function fib (n) result (f)