Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

MKL with valgrind

heiga
ビギナー
3,584件の閲覧回数
When I try to check any tools using MKL by Valgrind, I always receive some warnings as follows: ==13662== Syscall param sched_setaffinity(mask) points to unaddressable byte(s) ==13662== at 0x423BE7: syscall (in /lib/libc-2.5.so) ==13662== by 0x4931723: __kmp_affinity_determine_capable (in /usr/local/intel/compiler10.0.023/lib/libguide.so) ==13662== by 0x4927173: (within /usr/local/intel/compiler10.0.023/lib/libguide.so) ==13662== by 0x49253BF: (within /usr/local/intel/compiler10.0.023/lib/libguide.so) ==13662== by 0x4925535: __kmp_serial_initialize (in /usr/local/intel/compiler10.0.023/lib/libguide.so) ==13662== by 0x4917CB7: __kmpc_global_thread_num (in /usr/local/intel/compiler10.0.023/lib/libguide.so) ==13662== by 0x71980EA: mkl_lapack_dpotrf (in /usr/local/intel/mkl9.1.018/lib/32/libmkl_lapack.so) ==13662== by 0x80A7DC7: AccStatsMean (HTrjTrain.c:671) ==13662== by 0x80A960E: UpTrjMeansVars (HTrjTrain.c:1231) ==13662== by 0x80AA3C4: UpTrjModels (HTrjTrain.c:1456) ==13662== by 0x8049F34: main (HTrjCompV.c:222) ==13662== Address 0x0 is not stack'd, malloc'd or (recently) free'd In all cases, it happens at the first call of an MKL function. So I guess it is caused by MKL.
0 件の賞賛
1 解決策
TimP
名誉コントリビューター III
3,584件の閲覧回数
The valgrind indication doesn't indicate any problem with your code.

元の投稿で解決策を見る

6 返答(返信)
heiga
ビギナー
3,584件の閲覧回数
Sorry, my previous post was very hard to readSad smiley [:(]

When I try to check any tools using MKL by Valgrind, I always receive some warnings as follows:

==13662== Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
==13662== at 0x423BE7: syscall (in /lib/libc-2.5.so)
==13662== by 0x4931723: __kmp_affinity_determine_capable (in /usr/local/intel/compiler10.0.023/lib/libguide.so)
==13662== by 0x4927173: (within /usr/local/intel/compiler10.0.023/lib/libguide.so)
==13662== by 0x49253BF: (within /usr/local/intel/compiler10.0.023/lib/libguide.so)
==13662== by 0x4925535: __kmp_serial_initialize (in /usr/local/intel/compiler10.0.023/lib/libguide.so)
==13662== by 0x4917CB7: __kmpc_global_thread_num (in /usr/local/intel/compiler10.0.023/lib/libguide.so)
==13662== by 0x71980EA: mkl_lapack_dpotrf (in /usr/local/intel/mkl9.1.018/lib/32/libmkl_lapack.so)
==13662== by 0x80A7DC7: AccStatsMean (HTrjTrain.c:671)
==13662== by 0x80A960E: UpTrjMeansVars (HTrjTrain.c:1231)
==13662== by 0x80AA3C4: UpTrjModels (HTrjTrain.c:1456)
==13662== by 0x8049F34: main (HTrjCompV.c:222)
==13662== Address 0x0 is not stack'd, malloc'd or (recently) free'd

In all cases, it happens at the first call of an MKL function.
So I guess it is caused by MKL.
TimP
名誉コントリビューター III
3,584件の閲覧回数
Yes, your backtrace indicates that you called an MKL threaded function, and valgrind is directing your attention to behavior of a pthreads function called by the Intel OpenMP libraries.
Further than that, I don't know what your question is. When using Intel thread checker, before the time when serial MKL libraries were available, I had to replace MKL functions with equivalent source code. If you don't require MKL to spawn its own threads, the serial MKL might suit your purpose better.
paul_f
新規コントリビューター I
2,233件の閲覧回数

Strictly speaking there is no call to pthreads (or glibc) functions. Rather than calling 'sched_setaffinity()' the function, this is a call to 'syscall' for the 'sched_setaffinity' syscall.

heiga
ビギナー
3,584件の閲覧回数
Hi Tim, thank you very much for your immediate reply.

My question is that is it a bug of MKL or my source code?
Is it OK to ignore this message?
TimP
名誉コントリビューター III
3,585件の閲覧回数
The valgrind indication doesn't indicate any problem with your code.
heiga
ビギナー
3,584件の閲覧回数
Thank you so much!!
返信