From 196b499b916bfe9b6f798a290529ac6a9169c629 Mon Sep 17 00:00:00 2001 From: "zhongsiping2@huawei.com" Date: Wed, 13 Mar 2024 19:33:33 +0800 Subject: [PATCH] [Huawei] HMPI: fix a NULL ptr printf issue --- ompi/mca/pml/ucx/pml_ucx_request.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ompi/mca/pml/ucx/pml_ucx_request.c b/ompi/mca/pml/ucx/pml_ucx_request.c index 02348f8fcf..27cafe6ebd 100644 --- a/ompi/mca/pml/ucx/pml_ucx_request.c +++ b/ompi/mca/pml/ucx/pml_ucx_request.c @@ -203,6 +203,9 @@ void mca_pml_ucx_request_timeout_warn(uint64_t tag) opal_process_name_t proc_name = {.vpid = rank, .jobid = OMPI_PROC_MY_NAME->jobid}; OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, OPAL_PMIX_HOSTNAME, &proc_name, (char**)&(peer_hostname), OPAL_STRING); + if (rc != OPAL_SUCCESS) { + peer_hostname = "unknown"; + } PML_UCX_WARN("UCP request timeout! request tag 0x%lX local proc: %u peer proc: %d peer hostname: %s\n", tag, OMPI_PROC_MY_NAME->vpid, rank, peer_hostname); } -- Gitee