dumerrill/merge-spmv

libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory

Osmanyasal opened this issue · 1 comments

my prerequisites are fulfilled however when i try to execute the cpu_spmv i get the following error
error while loading shared libraries: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory

when i "somehow" fix it, i get another one and it goes on. what can i do?

SOLUTION

I created a bash script to add dynamic libraries so the program cpu_spmv can find it
here's it's

=== add_dynamic_libs.sh ===
#!/bin/bash

export LD_LIBRARY_PATH="$(echo $HOME)/intel/oneapi/mkl/2023.2.0/lib/intel64/:$LD_LIBRARY_PATH"

export LD_LIBRARY_PATH="$(echo $HOME)/intel/oneapi/mkl/2023.2.0/lib/intel64/:$LD_LIBRARY_PATH"

export LD_LIBRARY_PATH="$(echo $HOME)/intel/oneapi/compiler/2023.2.0/linux/compiler/lib/intel64_lin/:$LD_LIBRARY_PATH"
 
sudo ldconfig

open your terminal on the project folder and type

$ make cpu_spmv
$ source add_dynamic_libs
$ ./cpu_spmv --mtx="..." 

then it works fine