python numpy在solaris上,blas慢还是没有链接? [英] python numpy on solaris, blas slow or not linked?

查看:85
本文介绍了python numpy在solaris上,blas慢还是没有链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与OSX安装(在笔记本电脑上!)相比,在我的Solaris安装(在sparc服务器上运行)上,Matrix-Matrix相乘非常慢.笔记本电脑的运行速度提高了100倍(适用于3000x3000的双精度密集矩阵的矩阵矩阵乘法).

Matrix-Matrix multiplies are very slow on my Solaris install (running on a sparc server) compared to my OSX install (on a laptop!). The laptop runs 100 times faster (for matrix-matrix multiplies of 3000x3000 dense random matrices of doubles).

这一定是因为Solaris安装未使用blas,但是numpy脚本报告说库已找到".

It must be because the Solaris install is not using blas, but the numpy scripts are reporting that the libs are 'found'.

$python3 -c "import numpy.distutils.system_info as f; d = f.get_info('blas',0); print(d); d = f.get_info('lapack',0); print(d)"
 {'libraries': ['sunperf'], 'library_dirs': ['/home/$myname/local/archive/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib'], 'language': 'f77'}
 {'libraries': ['sunmath'], 'library_dirs': ['/home/$myname/local/archive/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib'],'language': 'f77'}

在Solaris安装上,以下导入失败,但在OSX上成功:

The following import FAILS on the Solaris install but succeeds on OSX:

导入numpy.core._dotblas

import numpy.core._dotblas

没有ATLAS可用于Solaris安装.我认为这不会在计算效率上产生如此大的差异.

There is no ATLAS available for the Solaris install. I wouldn't think this would make such a huge different in computational efficiency.

对其他测试有什么建议吗? distutils.system_info是否一定对安装没有任何意义?我尝试了numpy.alterdot()命令,但这似乎没有效果.

Any suggestions for other tests? Does the distutils.system_info not necessarily mean anything about the install? I tried the numpy.alterdot() command but that seems to have no effect.

更多注释:

我基本上遵循了 http://www.scipy.org/Installing_SciPy/Solaris,除了我的site.cfg如下:

And I basically followed the setup on http://www.scipy.org/Installing_SciPy/Solaris, except that my site.cfg looked like:

[DEFAULT]
library_dirs = $PATH_TO_MY_SOLARIS_DIR/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib
[blas]
blas_libs = sunperf
[lapack]
lapack_libs = sunmath

推荐答案

mathtick的答案都在注释中,这个问题源于dotblas需要ATLAS的事实. Fortran兼容的blas是不够的(根据numpy/core/setup.py中的评论)

Per mathtick's answer in the comments, the problem stems from the fact that dotblas needs ATLAS. Fortran-complied blas is not sufficient (per a comment in numpy/core/setup.py)

这篇关于python numpy在solaris上,blas慢还是没有链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆