I think the fix is to add the blas info to the setup.py.
have a look at sklearn/linear_model/setup.py
and see how get_blas_info is used,
and do the same for metrics/setup.py

If that solves the problem, please do a PR.

It's a bit odd because numpy is not linked against iomp5. What is that / 
where does it come from?


On 07/11/2015 02:37 PM, Fulton, Ben wrote:
>>>> print(np.__config__.show())
> lapack_opt_info:
>      libraries = ['mkl_lapack32', 'mkl_lapack64', 'mkl_intel_lp64', 
> 'mkl_intel_thread', 'mkl_core', 'pthread']
>      library_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/']
>      define_macros = [('SCIPY_MKL_H', None)]
>      include_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']
> blas_opt_info:
>      libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
>      library_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/']
>      define_macros = [('SCIPY_MKL_H', None)]
>      include_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']
> openblas_info:
>    NOT AVAILABLE
> lapack_mkl_info:
>      libraries = ['mkl_lapack32', 'mkl_lapack64', 'mkl_intel_lp64', 
> 'mkl_intel_thread', 'mkl_core', 'pthread']
>      library_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/']
>      define_macros = [('SCIPY_MKL_H', None)]
>      include_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']
> blas_mkl_info:
>      libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
>      library_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/']
>      define_macros = [('SCIPY_MKL_H', None)]
>      include_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']
> mkl_info:
>      libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
>      library_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/']
>      define_macros = [('SCIPY_MKL_H', None)]
>      include_dirs = 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']
> None
>>>> print(get_blas_info())
> (['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread'], 
> {'library_dirs': 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/lib/intel64/'], 
> 'define_macros': [('SCIPY_MKL_H', None)], 'include_dirs': 
> ['/N/soft/rhel6/intel/13.1.2/composer_xe_2013.4.183/mkl/include']})
>
> --
> Ben Fulton
> Research Technologies
> Scientific Applications and Performance Tuning
> Indiana University
> E-Mail: beful...@iu.edu
>
> -----Original Message-----
> From: Andreas Mueller [mailto:t3k...@gmail.com]
> Sent: Saturday, July 11, 2015 3:19 PM
> To: scikit-learn-general@lists.sourceforge.net
> Subject: Re: [Scikit-learn-general] Linking error with intel 13.1
>
> Can you do
>
> import numpy as np
> print(np.__config__.show())
>
> from sklearn._build_utils import get_blas_info
> print(get_blas_info)
>
>
> On 07/11/2015 12:44 PM, Fulton, Ben wrote:
>> I installed by downloading the latest tar file and "python setup.py 
>> install". Yes, numpy also relies on the intel/13.1 libraries.
>>
>> --
>> Ben Fulton
>> Research Technologies
>> Scientific Applications and Performance Tuning Indiana University
>> E-Mail: beful...@iu.edu
>>
>> -----Original Message-----
>> From: Andreas Mueller [mailto:t3k...@gmail.com]
>> Sent: Saturday, July 11, 2015 1:12 PM
>> To: scikit-learn-general@lists.sourceforge.net
>> Subject: Re: [Scikit-learn-general] Linking error with intel 13.1
>>
>> Hi Ben.
>> How did you install?
>> I'm not sure if we can get the linker flags form numpy. Is your numpy also 
>> installed with the intel compiler?
>>
>> Thanks,
>> Andy
>>
>> On 07/11/2015 11:45 AM, Fulton, Ben wrote:
>>> Hi,
>>>
>>> I tried to install sklearn on our cluster. It installed successfully, but 
>>> when running we got this error:
>>>
>>> >from sklearn.metrics.cluster import normalized_mutual_info_score
>>> intel/13.1/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_intel_thread.
>>> so: undefined symbol: __kmpc_reduce_nowait
>>>
>>> I add the following line to metrics/setup.py to fix it:
>>>
>>> extra_link_args=["-Lintel/13.1/composer_xe_2013.1.117/compiler/lib/in
>>> t
>>> el64/", "-liomp5"],
>>>
>>> But I suspect that there may be other places with the same issue. Can 
>>> anyone suggest a more permanent fix?
>>>
>>>
>>> --
>>> Ben Fulton
>>> Research Technologies
>>> Scientific Applications and Performance Tuning Indiana University
>>> E-Mail: beful...@iu.edu
>>>
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> -------- Don't Limit Your Business. Reach for the Cloud.
>>> GigeNET's Cloud Solutions provide you with the tools and support that
>>> you need to offload your IT needs and focus on growing your business.
>>> Configured For All Businesses. Start Your Cloud Today.
>>> https://www.gigenetcloud.com/
>>> _______________________________________________
>>> Scikit-learn-general mailing list
>>> Scikit-learn-general@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>> ----------------------------------------------------------------------
>> -------- Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that you 
>> need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/
>> _______________________________________________
>> Scikit-learn-general mailing list
>> Scikit-learn-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>> ----------------------------------------------------------------------
>> -------- Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that
>> you need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/
>> _______________________________________________
>> Scikit-learn-general mailing list
>> Scikit-learn-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that you 
> need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to