-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Disable MKL_USE_STATIC_LIBS by default #17794
base: master
Are you sure you want to change the base?
Conversation
I don't think MKL-DNN will dlopen intel omp. |
I hope the MKL package on ArchLinux can be fixed to include those missing files to support static linking. |
Sorry, I meant mkl dynamic single library will dlopen intel omp. |
Hah I should have guessed so. Given it looks like an issue of the system, can we keep the flag ON by default and suggest the users to turn it OFF when the static libraries are not present in the system? At least I see static libraries are distributed through yum/apt and the official parallel studio package from Intel. |
Why would you prefer static linking? |
Previously we mainly used makefile and it's static linked there: https://github.com/apache/incubator-mxnet/blob/master/make/config.mk#L142. |
Thank you for clarifying. Is there any other advantage besides following the Makefile setup? For distributing the libmxnet.so as part of a binary package static linking will be preferable, but that's a separate use-case and handled by the configuration files in |
@leezu could you rebase the code and run CI again? |
Blocked by #18255 |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@pengzhao-intel @TaoLv I investigated the CI failure, and there is a deterministic segfault in the mkl library when using dynamic linking. Do you have any suggestion how to proceed fixing it? See frame
To reproduce, check out this branch and run
This is the
and these are the immediate shared library dependencies
|
Co-authored-by: Anna Karbownik <anna.karbownik@intel.com>,
Description
Disable MKL_USE_STATIC_LIBS by default
Fixes #17791
#17751 tried to prevent the situation where MKLDNN
dlopens
intel omp after another omp has already been opened by the dynamic linker. #17751 both disabledMKL_USE_SINGLE_DYNAMIC_LIBRARY
and enabledMKL_USE_STATIC_LIBS
. EnablingMKL_USE_STATIC_LIBS
by default is however not needed and causes issues on some systems. Thus disableMKL_USE_STATIC_LIBS
by default again.