git: a46966bb3496 - main - net/mpich: replace L0 fix with upstream version

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 27 Oct 2021 22:24:13 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a46966bb3496e0cf8100f6acdd671d4fb90c9cdb

commit a46966bb3496e0cf8100f6acdd671d4fb90c9cdb
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-10-27 21:54:51 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-27 22:19:27 +0000

    net/mpich: replace L0 fix with upstream version
    
    PR:             252536
    Reported by:    Edoardo Aprà
---
 net/mpich/Makefile             |  1 -
 net/mpich/files/patch-l0-1.4.1 | 50 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/net/mpich/Makefile b/net/mpich/Makefile
index 60abfe18c3e5..24fef58e258e 100644
--- a/net/mpich/Makefile
+++ b/net/mpich/Makefile
@@ -55,7 +55,6 @@ DHYDRA_DESC=	Make hydra the default process manager
 
 L0_DESC=		oneAPI Level Zero support
 L0_LIB_DEPENDS=		libze_loader.so:devel/level-zero
-L0_CPPFLAGS=		-DZE_IPC_MEMORY_FLAG_TBD=ZE_IPC_MEMORY_FLAG_BIAS_CACHED # 1.4.1
 L0_CONFIGURE_ENV_OFF=	ac_cv_header_level_zero_ze_api_h=no \
 			ac_cv_lib_ze_loader_zeInit=no
 
diff --git a/net/mpich/files/patch-l0-1.4.1 b/net/mpich/files/patch-l0-1.4.1
new file mode 100644
index 000000000000..6042bc127616
--- /dev/null
+++ b/net/mpich/files/patch-l0-1.4.1
@@ -0,0 +1,50 @@
+https://github.com/pmodels/mpich/pull/5623
+
+src/gpu/mpl_gpu_ze.c:163:71: error: use of undeclared identifier 'ZE_IPC_MEMORY_FLAG_TBD'
+        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, ZE_IPC_MEMORY_FLAG_TBD, ptr);
+                                                                      ^
+
+--- src/mpi/romio/mpl/src/gpu/mpl_gpu_ze.c.orig	2021-05-25 17:37:05 UTC
++++ src/mpi/romio/mpl/src/gpu/mpl_gpu_ze.c
+@@ -160,7 +160,7 @@ int MPL_gpu_ipc_handle_map(MPL_gpu_ipc_mem_handle_t ip
+     int mpl_err = MPL_SUCCESS;
+     ze_result_t ret;
+     ret =
+-        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, ZE_IPC_MEMORY_FLAG_TBD, ptr);
++        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, 0, ptr);
+     if (ret != ZE_RESULT_SUCCESS) {
+         mpl_err = MPL_ERR_GPU_INTERNAL;
+         goto fn_fail;
+--- src/mpl/src/gpu/mpl_gpu_ze.c.orig	2021-05-25 17:37:05 UTC
++++ src/mpl/src/gpu/mpl_gpu_ze.c
+@@ -160,7 +160,7 @@ int MPL_gpu_ipc_handle_map(MPL_gpu_ipc_mem_handle_t ip
+     int mpl_err = MPL_SUCCESS;
+     ze_result_t ret;
+     ret =
+-        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, ZE_IPC_MEMORY_FLAG_TBD, ptr);
++        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, 0, ptr);
+     if (ret != ZE_RESULT_SUCCESS) {
+         mpl_err = MPL_ERR_GPU_INTERNAL;
+         goto fn_fail;
+--- src/pm/hydra2/mpl/src/gpu/mpl_gpu_ze.c.orig	2021-05-25 17:37:05 UTC
++++ src/pm/hydra2/mpl/src/gpu/mpl_gpu_ze.c
+@@ -160,7 +160,7 @@ int MPL_gpu_ipc_handle_map(MPL_gpu_ipc_mem_handle_t ip
+     int mpl_err = MPL_SUCCESS;
+     ze_result_t ret;
+     ret =
+-        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, ZE_IPC_MEMORY_FLAG_TBD, ptr);
++        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, 0, ptr);
+     if (ret != ZE_RESULT_SUCCESS) {
+         mpl_err = MPL_ERR_GPU_INTERNAL;
+         goto fn_fail;
+--- src/pm/hydra/mpl/src/gpu/mpl_gpu_ze.c.orig	2021-05-25 17:37:05 UTC
++++ src/pm/hydra/mpl/src/gpu/mpl_gpu_ze.c
+@@ -160,7 +160,7 @@ int MPL_gpu_ipc_handle_map(MPL_gpu_ipc_mem_handle_t ip
+     int mpl_err = MPL_SUCCESS;
+     ze_result_t ret;
+     ret =
+-        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, ZE_IPC_MEMORY_FLAG_TBD, ptr);
++        zeMemOpenIpcHandle(global_ze_context, dev_handle, ipc_handle, 0, ptr);
+     if (ret != ZE_RESULT_SUCCESS) {
+         mpl_err = MPL_ERR_GPU_INTERNAL;
+         goto fn_fail;