From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97C693858431; Fri, 19 Jan 2024 23:25:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97C693858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705706750; bh=5cBQBcQpTfvgubkwXoU1x8tDtX8T58nZ8mAJ51Hopzk=; h=From:To:Subject:Date:From; b=RMN8nC0ksw7lpr8elq6P0+4fJs+ruWxxlyMHe2u7LkmBW1U6oS0a5AQ0WXjMM3h8h SBL20Y5FkPrkhFciUUSWf57SnjXu94gdVr5vDNhAB8fvDFS1hqzHRmwkclueoDnXtg dCksNX03m4sdpAy3ZH7xQjIF/wUeWiqrvPDVGlzo= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/113513] New: [OpenMP] libgomp: cuCtxGetDevice error with OMP_DISPLAY_ENV=true OMP_TARGET_OFFLOAD="mandatory" for libgomp.c/target-52.c Date: Fri, 19 Jan 2024 23:25:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: openmp, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113513 Bug ID: 113513 Summary: [OpenMP] libgomp: cuCtxGetDevice error with OMP_DISPLAY_ENV=3Dtrue OMP_TARGET_OFFLOAD=3D"mandatory" for libgomp.c/target-52.c Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: openmp, wrong-code Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: jakub at gcc dot gnu.org, tschwinge at gcc dot gnu.org Target Milestone: --- When using both OMP_DISPLAY_ENV=3Dtrue and OMP_TARGET_OFFLOAD=3D"mandatory"= , the device has to be initiated early as OMP_DEFAULT_DEVICE (either 0 or -4 =3D omp_invalid_device) needs to be known before printing the ICVs. On my system, this causes libgomp: cuCtxGetDevice error: unknown cuda error. That's with "CUDA Version: 12.3" and "NVIDIA RTX A1000 6GB" with --with-arch=3Dsm_80. I am somewhat sure that I have manually tested it before; our tester wasn't able to remotely set the env vars, hence, I don't know whether it did work there or not - nor whether it is a regression, depends on CUDA, sm_xx, my c= ard or ...=