From nobody Fri May 10 20:05:18 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vbfxp5F7dz5KLQg; Fri, 10 May 2024 20:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vbfxp4cYjz4Snt; Fri, 10 May 2024 20:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715371518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64suu3nUatI7kJ3m1ckMqYW8D/pG9CwKB8deJcdHLlc=; b=NlIgvHi1mgzXMz5jiLbCA4GwWf+x5WPC+z1gNMZulfoOBIFntLqeahF7ZvZbRHkcn3cpgU N7S0PON1J0uCQREDWg53+wZgBhcdJCo7eZIX52WGEYmbbjHEajq6z66VzUsAqElMDQytgy 5Gkl3c9ECWpWJdseS+ZU1sALyRxXxYvyjsXGYH2OhOk6nKRJkXMOBtypDeW9cMfsNUysFE 14OYBluhor2YTm4mA6kJB/c22W+IaAGL3BW+dFPgxJTzoaKbYh7f6LI3EhbwAUNXjDObiV hehEOHMHHzQcIkuHE5Zpwa8d/P7alFXzK3SulbPkRDmvaJIaLHoz9V0fgTNgKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715371518; a=rsa-sha256; cv=none; b=dAvU1L6fUukmZIXosPnwGe2QGZEaWFORcevzoOZB+xfOvXjOKYcWVsHIY+3DUOqkjjJ2Lx Dt++nVBaZsMFtstQi8RQSaqRnx22DsCDB6qYvZzX2aV6LUC7evXZS4LgY2YcRarZFKbcH0 Dr8/Iq8oXa1WKzB7mxIyf80sKVcDUEoe244MHW/Jj2z/ChC/BaIlEVI9mzkQFEkbDUiCEb 3SIbTKY2JNJKtDdTYJUKjbebRdXdOo4/pyahz8kRkDlBD99Y1byBCx9BwsL0yDyHBATzvM qFnof2tToX97B5/ibKDMRd51Vae78REXJ+dyvoeT++dp7jePWMo6ulpj36UZdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715371518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64suu3nUatI7kJ3m1ckMqYW8D/pG9CwKB8deJcdHLlc=; b=yXwgWMkwz3Mr5iMrl/PnR4dM+z7ySzK7guDRUgTvbbjfNvuhwWvKBCrsYNcqldLPcq+54G UCfZ8dWbwrhHZeK3w08cyoIsn2OkHAF11dgdETep8RYgBdH1CHB2vNyAd4YDFnEWYgOfla NFxGKReFMeffzI8PGnUv34WIepCHiZbwNozFIVUpejHKdjWQF79UiBkV7WBIz+cIjMYT7r knCTe7WKAsexOwBoQCksnc1ca29TGuP4KkIzYPcu783+yYCEHlvTWhsiuGYA50WAss3/CX 947VvGOSCVJZfXwuFVZZMxKarFkRukYy+K4bXTLVvgTwZM0jjwwxEHW+BR49yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vbfxp4CdRzrXJ; Fri, 10 May 2024 20:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44AK5ITM063580; Fri, 10 May 2024 20:05:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44AK5IHE063577; Fri, 10 May 2024 20:05:18 GMT (envelope-from git) Date: Fri, 10 May 2024 20:05:18 GMT Message-Id: <202405102005.44AK5IHE063577@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: fdb8b5148cc6 - main - devel/llvm17: openmp Fix child processes affinity List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdb8b5148cc699099d2249c71ab6e83b3f44dba2 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=fdb8b5148cc699099d2249c71ab6e83b3f44dba2 commit fdb8b5148cc699099d2249c71ab6e83b3f44dba2 Author: Brooks Davis AuthorDate: 2024-05-10 17:20:47 +0000 Commit: Brooks Davis CommitDate: 2024-05-10 20:04:30 +0000 devel/llvm17: openmp Fix child processes affinity Backport upstream 73bb8d9d92f6: [OpenMP] Fix child processes to use affinity_none (#91391) PR: 278843 Submitted by: cbl@cbl.us --- devel/llvm17/Makefile | 2 +- devel/llvm17/files/patch-backport-73bb8d9d92f6 | 40 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/devel/llvm17/Makefile b/devel/llvm17/Makefile index 2a0873547258..c43225b7ed5d 100644 --- a/devel/llvm17/Makefile +++ b/devel/llvm17/Makefile @@ -1,6 +1,6 @@ PORTNAME= llvm DISTVERSION= 17.0.6 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= devel lang MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \ https://${PRE_}releases.llvm.org/${LLVM_RELEASE}${RCDIR}/ diff --git a/devel/llvm17/files/patch-backport-73bb8d9d92f6 b/devel/llvm17/files/patch-backport-73bb8d9d92f6 new file mode 100644 index 000000000000..d9de14e2deb0 --- /dev/null +++ b/devel/llvm17/files/patch-backport-73bb8d9d92f6 @@ -0,0 +1,40 @@ +commit 73bb8d9d92f689863c94d48517e89d35dae0ebcf +Author: Jonathan Peyton +Date: Wed May 8 09:23:50 2024 -0500 + + [OpenMP] Fix child processes to use affinity_none (#91391) + + When a child process is forked with OpenMP already initialized, the + child process resets its affinity mask and sets proc-bind-var to false + so that the entire original affinity mask is used. This patch corrects + an issue with the affinity initialization code setting affinity to + compact instead of none for this special case of forked children. + + The test trying to catch this only testing explicit setting of + KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting. + + Fixes: #91098 + +diff --git openmp/runtime/src/kmp_settings.cpp openmp/runtime/src/kmp_settings.cpp +index b9c8289b5c51..8b6092cb1085 100644 +--- openmp/runtime/src/kmp_settings.cpp ++++ openmp/runtime/src/kmp_settings.cpp +@@ -6420,6 +6420,8 @@ void __kmp_env_initialize(char const *string) { + } + if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) && + (__kmp_nested_proc_bind.bind_types[0] != proc_bind_default)) { ++ if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_false) ++ __kmp_affinity.type = affinity_none; + if (__kmp_affinity.type == affinity_default) { + __kmp_affinity.type = affinity_compact; + __kmp_affinity.flags.dups = FALSE; +diff --git openmp/runtime/test/affinity/redetect.c openmp/runtime/test/affinity/redetect.c +index dba83b72cc42..4b96d1bd92ee 100644 +--- openmp/runtime/test/affinity/redetect.c ++++ openmp/runtime/test/affinity/redetect.c +@@ -1,4 +1,5 @@ + // RUN: %libomp-compile ++// RUN: %libomp-run + // RUN: env KMP_AFFINITY=none %libomp-run + // REQUIRES: linux +