From 2e47556debe11307ba4a2b73ed24fff12ea7ae21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=88=E5=AE=87=E9=9A=86?= Date: Fri, 24 Oct 2025 14:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E4=B8=8B=E8=AE=BF=E9=97=AEhostname=E4=B8=BA=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ompi/mca/pml/ucx/pml_ucx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/pml/ucx/pml_ucx.c b/ompi/mca/pml/ucx/pml_ucx.c index 14b76b04a7..2c28bcb394 100644 --- a/ompi/mca/pml/ucx/pml_ucx.c +++ b/ompi/mca/pml/ucx/pml_ucx.c @@ -427,9 +427,10 @@ static ucp_ep_h mca_pml_ucx_add_proc_common(ompi_proc_t *proc) ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ep_params.address = address; + /* fix the issue where hostname is null pointer when using multiple threads */ ep_params.field_mask |= UCP_EP_PARAM_FIELD_PEER_HOST_ADDR; ep_params.vpid = proc->super.proc_name.vpid; - ep_params.peer_hostname = proc->super.proc_hostname; + ep_params.peer_hostname = opal_get_proc_hostname(&proc->super); status = ucp_ep_create(ompi_pml_ucx.ucp_worker, &ep_params, &ep); free(address); -- Gitee