![](https://secure.gravatar.com/avatar/3857d7e82452509e03587531bd8f5735.jpg?s=120&d=mm&r=g)
Hi all, I have managed to compile numpy using pathscale and ACML on a 64 bit AMD system. Now I wanted to verify that numpy.dot indeed uses the ACML libs. The example for dot() (http://www.scipy.org/Numpy_Example_List?highlight=%28example%29#head-c7a573f...) suggest a way of doing this: 1 u0050015@lo-03-02 .../core $ python -c "import numpy; print id(numpy.dot)==id(numpy.core.multiarray.dot);" True This indicates that I am not using the acml libraries. When running a benchmark (see attach) and comparing to a non-ACML installation though, the strange thing is that there is a clear speed difference, suggesting again that the acml libraries are indeed used. Because this is not all that clear to me, I was wondering whether there exists an alternative way of verifying what libraries are used. Many thanks, YVES
![](https://secure.gravatar.com/avatar/677049f32806d031009c6b18a47053c0.jpg?s=120&d=mm&r=g)
Hi, I am also looking to verify the vendor-libs being used. What does numpy.__config__.show() tell you ? toon Yves Frederix wrote:
Hi all,
I have managed to compile numpy using pathscale and ACML on a 64 bit AMD system. Now I wanted to verify that numpy.dot indeed uses the ACML libs. The example for dot() (http://www.scipy.org/Numpy_Example_List?highlight=%28example%29#head-c7a573f...) suggest a way of doing this:
1 u0050015@lo-03-02 .../core $ python -c "import numpy; print id(numpy.dot)==id(numpy.core.multiarray.dot);" True
This indicates that I am not using the acml libraries.
When running a benchmark (see attach) and comparing to a non-ACML installation though, the strange thing is that there is a clear speed difference, suggesting again that the acml libraries are indeed used.
Because this is not all that clear to me, I was wondering whether there exists an alternative way of verifying what libraries are used.
Many thanks, YVES
------------------------------------------------------------------------
ACML:
dim x.T*y x*y.T A*x A*B A.T*x ----------------------------------------------------------------- 5000 0.002492 0.002417 0.002412 0.002399 0.002416 50000 0.020074 0.020024 0.020004 0.020003 0.020024 100000 0.092777 0.093690 0.100220 0.093787 0.094250 200000 0.184933 0.198623 0.196120 0.197089 0.197273 300000 0.276583 0.279177 0.280898 0.284016 0.276204 500000 0.476340 0.481987 0.471875 0.480868 0.481501 1000000.0 0.892623 0.895500 0.915173 0.894815 0.922501 5000000.0 4.450555 4.465748 4.467870 4.468188 4.469083
No ACML:
dim x.T*y x*y.T A*x A*B A.T*x ----------------------------------------------------------------- 5000 0.002523 0.002428 0.002410 0.002430 0.002419 50000 0.024756 0.061520 0.036575 0.036399 0.036450 100000 0.338576 0.353074 0.169472 0.302087 0.334633 200000 0.670803 0.735732 0.538166 0.649335 0.744496 300000 1.004381 1.269259 0.482542 2.194308 0.611997 500000 1.110656 1.504701 1.571736 1.656021 1.491146 1000000.0 2.182746 2.234478 2.254645 2.439508 2.537558 5000000.0 10.878910 16.578266 8.265109 8.905976 17.124400
------------------------------------------------------------------------
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
![](https://secure.gravatar.com/avatar/3857d7e82452509e03587531bd8f5735.jpg?s=120&d=mm&r=g)
Hi,
I am also looking to verify the vendor-libs being used.
What does numpy.__config__.show() tell you ?
In the case of the ACML compilation, I get: 0 u0050015@lo-03-02 .../u0050015 $ python -c "import numpy; numpy.show_config()" atlas_threads_info: libraries = ['lapack', 'acml', 'python2.4'] library_dirs = ['/apps/prod/python/2.4.3/lib'] language = f77 blas_opt_info: libraries = ['acml', 'python2.4'] library_dirs = ['/apps/prod/python/2.4.3/lib'] define_macros = [('NO_ATLAS_INFO', 2)] language = c atlas_blas_threads_info: libraries = ['acml', 'python2.4'] library_dirs = ['/apps/prod/python/2.4.3/lib'] language = c lapack_opt_info: libraries = ['lapack', 'acml', 'python2.4'] library_dirs = ['/apps/prod/python/2.4.3/lib'] define_macros = [('NO_ATLAS_INFO', 2)] language = f77 lapack_mkl_info: NOT AVAILABLE blas_mkl_info: NOT AVAILABLE mkl_info: NOT AVAILABLE In the case of a more standard installation (blas/lapack/atlas) I guess this might give some extra information, but as I understand these are just the paths to the libraries that were used at compile time. If show_config() in your case does not show your lapack dir, I am afraid you are not using them as they were not found during compilation. In order to use ACML I had to use a custom site.cfg (which basically says what show_config() now reports), so I wanted some kind of extra verification that the installation is fine. My confusion actually comes from the fact that importing _dotblas in my installation results in undefined references. Yet the timings of numpy.dot seem ok, so 'some' optimized library is used, it is just not clear which one. 0 u0050015@lo-03-02 .../core $ pwd /data/home/u0050015/inst/lib/python2.4/site-packages/numpy/core 0 u0050015@lo-03-02 .../core $ python -c "import _dotblas" Traceback (most recent call last): File "<string>", line 1, in ? ImportError: /apps/prod/python/2.4.3/lib/libacml.so: undefined symbol: vcosf Regards, YVES
participants (2)
-
Toon Knapen
-
Yves Frederix