xianyi/BLAS-Tester

How to use Blas-tester to test MKL

hengyuanzhi opened this issue · 2 comments

@xianyi
I want to use Blas-tester to test MKL. I have install MKL on my Linux, in the directory of /opt/intel/mkl/lib/intel64, in the directory of BLAS-TESTER-MASTER, I use the comand of

make TEST_BLAS=/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a ARCH=X86 BINARY=64 NUMTHREADS=1 L2SIZE=4194304

the error is

mkdir -p . ./bin
gcc -I./include -DAdd_  -DStringSunStyle -DATL_OS_Linux  -DTHREADNUM=1  -DF77_INTEGER=int -m64 -O3 -o ./bin/xsl1blastst sl1blastst.o ATL_sf77rotg.o ATL_sf77rot.o ATL_sf77rotmg.o ATL_sf77rotm.o ATL_sf77swap.o ATL_sf77scal.o ATL_sf77copy.o ATL_sf77axpy.o ATL_sf77dot.o ATL_sdsf77dot.o ATL_dsf77dot.o ATL_sf77nrm2.o ATL_sf77asum.o ATL_sf77amax.o ATL_sf77rotgf.o ATL_sf77rotf.o ATL_sf77rotmgf.o ATL_sf77rotmf.o ATL_sf77swapf.o ATL_sf77scalf.o ATL_sf77copyf.o ATL_sf77axpyf.o ATL_sf77dotf.o ATL_sdsf77dotf.o  ATL_dsf77dotf.o ATL_sf77nrm2f.o ATL_sf77asumf.o ATL_sf77amaxf.o ATL_sf77aminf.o ATL_flushcache.o ATL_sinfnrm.o ATL_rand.o ATL_svdiff.o ATL_sf77amin.o  ./refblas/librefblas.a /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a  -lm -lgfortran
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_dsdot_lp64.o): In function `dsdot':
../../../../blas/iface/thunks_ext/_dsdot.c:(.text+0x54): undefined reference to `mkl_blas_dsdot'
../../../../blas/iface/thunks_ext/_dsdot.c:(.text+0xcb): undefined reference to `mkl_blas_dsdot'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_sswap_lp64.o): In function `sswap':
../../../../blas/iface/thunks_ext/_sswap.c:(.text+0x54): undefined reference to `mkl_blas_sswap'
../../../../blas/iface/thunks_ext/_sswap.c:(.text+0xcb): undefined reference to `mkl_blas_sswap'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_srot_lp64.o): In function `srot':
../../../../blas/iface/thunks_ext/_srot.c:(.text+0x68): undefined reference to `mkl_blas_srot'
../../../../blas/iface/thunks_ext/_srot.c:(.text+0xff): undefined reference to `mkl_blas_srot'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_sdot_lp64.o): In function `sdot':
../../../../blas/iface/thunks_ext/_sdot.c:(.text+0x54): undefined reference to `mkl_blas_sdot'
../../../../blas/iface/thunks_ext/_sdot.c:(.text+0xcb): undefined reference to `mkl_blas_sdot'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_scopy_lp64.o): In function `scopy':
../../../../blas/iface/thunks_ext/_scopy.c:(.text+0x54): undefined reference to `mkl_blas_scopy'
../../../../blas/iface/thunks_ext/_scopy.c:(.text+0xcb): undefined reference to `mkl_blas_scopy'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_saxpy_lp64.o): In function `saxpy':
../../../../blas/iface/thunks_ext/_saxpy.c:(.text+0x55): undefined reference to `mkl_blas_saxpy'
../../../../blas/iface/thunks_ext/_saxpy.c:(.text+0xd9): undefined reference to `mkl_blas_saxpy'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_isamin_lp64.o): In function `isamin':
../../../../blas/iface/thunks_ext_to_ker/_isamin.c:(.text+0x42): undefined reference to `mkl_blas_isamin'
../../../../blas/iface/thunks_ext_to_ker/_isamin.c:(.text+0x9b): undefined reference to `mkl_blas_isamin'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_isamax_lp64.o): In function `isamax':
../../../../blas/iface/thunks_ext_to_ker/_isamax.c:(.text+0x42): undefined reference to `mkl_blas_isamax'
../../../../blas/iface/thunks_ext_to_ker/_isamax.c:(.text+0x9b): undefined reference to `mkl_blas_isamax'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_sscal_lp64.o): In function `sscal':
../../../../blas/iface/thunks_ext_to_ker/_sscal.c:(.text+0x42): undefined reference to `mkl_blas_sscal'
../../../../blas/iface/thunks_ext_to_ker/_sscal.c:(.text+0xab): undefined reference to `mkl_blas_sscal'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_srotmg_lp64.o): In function `srotmg':
../../../../blas/iface/thunks_ext_to_ker/_srotmg.c:(.text+0x1b): undefined reference to `mkl_blas_srotmg'
../../../../blas/iface/thunks_ext_to_ker/_srotmg.c:(.text+0x96): undefined reference to `mkl_blas_srotmg'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_srotm_lp64.o): In function `srotm':
../../../../blas/iface/thunks_ext_to_ker/_srotm.c:(.text+0x55): undefined reference to `mkl_blas_srotm'
../../../../blas/iface/thunks_ext_to_ker/_srotm.c:(.text+0xd9): undefined reference to `mkl_blas_srotm'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_srotg_lp64.o): In function `srotg':
../../../../blas/iface/thunks_ext_to_ker/_srotg.c:(.text+0x1b): undefined reference to `mkl_blas_srotg'
../../../../blas/iface/thunks_ext_to_ker/_srotg.c:(.text+0x88): undefined reference to `mkl_blas_srotg'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_snrm2_lp64.o): In function `snrm2':
../../../../blas/iface/thunks_ext_to_ker/_snrm2.c:(.text+0x42): undefined reference to `mkl_blas_snrm2'
../../../../blas/iface/thunks_ext_to_ker/_snrm2.c:(.text+0x9b): undefined reference to `mkl_blas_snrm2'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_sdsdot_lp64.o): In function `sdsdot':
../../../../blas/iface/thunks_ext_to_ker/_sdsdot.c:(.text+0x55): undefined reference to `mkl_blas_sdsdot'
../../../../blas/iface/thunks_ext_to_ker/_sdsdot.c:(.text+0xd9): undefined reference to `mkl_blas_sdsdot'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_sasum_lp64.o): In function `sasum':
../../../../blas/iface/thunks_ext_to_ker/_sasum.c:(.text+0x42): undefined reference to `mkl_blas_sasum'
../../../../blas/iface/thunks_ext_to_ker/_sasum.c:(.text+0x9b): undefined reference to `mkl_blas_sasum'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_verbose_internal.o): In function `mkl_serv_iface_verbose_mode':
../../../../serv/iface/thunks_ext_to_ker/_verbose_internal.c:(.text+0x3): undefined reference to `mkl_serv_verbose_mode'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_verbose_info_internal.o): In function `mkl_serv_iface_print_verbose_info':
../../../../serv/iface/thunks_ext_to_ker/_verbose_info_internal.c:(.text+0x1): undefined reference to `mkl_serv_print_verbose_info'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a(_dsecnd_internal.o): In function `mkl_serv_iface_dsecnd':
../../../../serv/iface/thunks_ext_to_ker/_dsecnd_internal.c:(.text+0x2): undefined reference to `mkl_serv_dsecnd'
collect2: error: ld returned 1 exit status
make: *** [xsl1blastst] Error 1

I also use the library of libmkl_intel_ilp64.a, the error is same.

System info is as follow.

uname -a
Linux TEST_DN 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/Linux

CPU info:model name : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz

> lsb_release -a
> LSB Version:  core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
> Distributor ID:   SUSE LINUX
> Description:  SUSE Linux Enterprise Server 11 (x86_64)
> Release:  11
> Codename: n/a
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-4.9.3 --enable-threads=posix --disable-checking --enable--long-long --enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 4.9.3 (GCC) 

gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-4.9.3 --enable-threads=posix --disable-checking --enable--long-long --enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 4.9.3 (GCC) 

Thanks.

Please read MKL document. You have wrong MKL link line.

https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

@xianyi
Thanks for your reply.

In the directory of intel/composer_xe_2015.1.133/mkl/tools/builder

 :/opt/intel/composer_xe_2015.1.133/mkl/tools/builder# ls
blas_example_list  cblas_example_list  dft_example_list  lapack_example_list  makefile  my_mkl.so  spblas_example_list  user_example_list  vml_vsl_example_list

I use the commond of
make libintel64 name=my_mkl export=blas_example_list
can obtain the MKL single dynamic library "my_mkl.so"
I use BLAS-TESTER to build with this .so file
make TEST_BLAS=/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so ARCH=X86_64 BINARY=64 L2SIZE=4194304
the error is list as follow:

:/opt/BLAS-Tester-master# make TEST_BLAS=/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so ARCH=X86_64 BINARY=64 L2SIZE=4194304
mkdir -p . ./bin
gcc -I./include -DAdd_  -DStringSunStyle -DATL_OS_Linux  -DTHREADNUM=1  -DF77_INTEGER=int -O3 -o ./bin/xsl1blastst sl1blastst.o ATL_sf77rotg.o ATL_sf77rot.o ATL_sf77rotmg.o ATL_sf77rotm.o ATL_sf77swap.o ATL_sf77scal.o ATL_sf77copy.o ATL_sf77axpy.o ATL_sf77dot.o ATL_sdsf77dot.o ATL_dsf77dot.o ATL_sf77nrm2.o ATL_sf77asum.o ATL_sf77amax.o ATL_sf77rotgf.o ATL_sf77rotf.o ATL_sf77rotmgf.o ATL_sf77rotmf.o ATL_sf77swapf.o ATL_sf77scalf.o ATL_sf77copyf.o ATL_sf77axpyf.o ATL_sf77dotf.o ATL_sdsf77dotf.o   ATL_dsf77dotf.o ATL_sf77nrm2f.o ATL_sf77asumf.o ATL_sf77amaxf.o ATL_sf77aminf.o ATL_flushcache.o ATL_sinfnrm.o ATL_rand.o ATL_svdiff.o ATL_sf77amin.o  ./refblas/librefblas.a /opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so  -lm -lgfortran
/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so: undefined reference to `pthread_mutex_trylock'
/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so: undefined reference to `dlsym'
/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so: undefined reference to `dladdr'
/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so: undefined reference to `dlvsym'
/opt/intel/composer_xe_2015.1.133/mkl/tools/builder/my_mkl.so: undefined reference to `dlopen'
collect2: error: ld returned 1 exit status
Makefile:1476: recipe for target 'xsl1blastst' failed
make: *** [xsl1blastst] Error 1