I installed mkl_2020.1 on centos7 and linked my cpp file with libmkl_rt.so. The application runs as well.
My question is that does my application use avx2 to speed up? It seems that libmkl_avx2.so was not called because it runs as well even I delete file libmkl_avx2.so. I confirmed my cpu is support avx2 instruction.
Yes, linking with lmkl_rt would be enough to run your code on avx2 based system w/o explicit linking with lmkl_avx2. You may easier to check which code path has been called by setting MKL_VERBOSE env. variable and if your code calls BLAS, LAPACK, or FFT routines. All another part of MKL still doesn't support the verbose mode so far.
You may take into account that using mkl singly dynamic library has some restrictions by using Intel LP64 and Intel threading only. You may find out more details into MKL User's Guide