"Failed to load the libdcmi.so dynamic library" Is Displayed When the ascend-dmi Command Is Executed

Symptom

"Failed to load the libdcmi.so dynamic library. Check the environment configuration dependency." is displayed when Ascend DMI is used.

The following uses software and hardware compatibility test performed by Ascend DMI as an example. The error information is as follows:

[root@****]# ascend-dmi -c
Failed to load the libdcmi.so dynamic library. Check the environment configuration dependency.

Possible Causes

  • The driver is incorrectly installed.
  • The driver environment variable is incorrect.
  • The driver version is not a commercial version. Check whether libdcmi.so exists or whether the permission is normal.

Solution

  1. Run the npu-smi info command to check the driver installation status. If information similar to the following is displayed, the driver is properly installed:
    [root@****]$npu-smi info
    +--------------------------------------------------------------------------------------------+
    | npu-smi 24.1.rc2.b010                    Version: 24.1.rc2.b010    
    +--------------------------+--------------+--------------------------------------------------+
    | NPU   Name               | Health       | Power(W)   Temp(C)         Hugepages-Usage(page) |
    | Chip  Device             | Bus-Id       | AICore(%)  Memory-Usage(MB)                      |
    +==========================+==============+==================================================+
    | 0     xxxx               | OK           | 9.6        56              15   /15              |
    | 0     0                  | NA           | 0          3398 / 11578                          |
    +==========================+==============+==================================================+     
  2. Run the env command to check whether the environment variable LD_LIBRARY_PATH contains driver-related environment variables.
  3. Check whether the libdcmi.so permission is correct.
    find /usr/local/Ascend/driver/ -name libdcmi.so

    Search for the location of libdcmi.so and check the corresponding permission. If the permission is 444, the permission is normal. If the permission is not found or the permission is not 444, the permission is abnormal. /usr/local/Ascend/driver/ is the actual driver installation path.

    root@****:~# find /usr/local/Ascend/driver/ -name libdcmi.so
    /usr/local/Ascend/driver/lib64/driver/libdcmi.so
    root@****:~# ll /usr/local/Ascend/driver/lib64/driver/libdcmi.so
    -r--r--r-- 1 root root 447832 May 23 02:59 /usr/local/Ascend/driver/lib64/driver/libdcmi.so