From cd507663a838bdb3d1711b87b8a85564a65be430 Mon Sep 17 00:00:00 2001 From: Zheng Zengkai Date: Mon, 8 Sep 2025 18:12:03 +0800 Subject: [PATCH] app-numa-replicas: Fix soname_dep_map bad array subscript when starting app-numa-replicas service for some specific hpc application, it complains: " /usr/bin/app-numa-replicas.sh: line 30: soname_dep_map[$soname]: bad array subscript " After some debugging it turns out that the SONAME section of some rare so files may be empty, like below: " [root@node-73 ~]# readelf -d /share/xxxx/libklapack_full.so | grep SONAME [root@node-73 ~]# " Replace "patchelf --print-soname" with "basename" to get the soname if the SONAME section of some shared lib files are empty, like libklapack_full.so Closes: https://gitee.com/openeuler/hpc/issues/ICWYLT Signed-off-by: Zheng Zengkai --- .../scripts/app-numa-replicas/app-numa-replicas.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ComputingLibraryTool/scripts/app-numa-replicas/app-numa-replicas.sh b/ComputingLibraryTool/scripts/app-numa-replicas/app-numa-replicas.sh index d1cb62fd..fb785728 100755 --- a/ComputingLibraryTool/scripts/app-numa-replicas/app-numa-replicas.sh +++ b/ComputingLibraryTool/scripts/app-numa-replicas/app-numa-replicas.sh @@ -27,6 +27,7 @@ function create_elf_and_libs_replicas() { if [ -f $dep ]; then local dep_absolute_path=$(readlink -f $dep) local soname=$(patchelf --print-soname $dep) + [ -z "$soname" ] && soname=$(basename $dep) soname_dep_map[$soname]=$dep_absolute_path all_deps_list+=("$dep_absolute_path") fi -- Gitee