python - Compiling numpy with OpenBLAS integration -


I'm trying to install numpy with OpenBLAS I am but I need to write how to write the site.cfg file, as on the loss

When the installation was followed without errors, but the performance decreased on the increase in the number of threads used by open BLAS (controlled by environmental variable OMP_NUM_THREADS) from 1.

I'm not sure that the OpenABAS integration is correct. Anyone can provide a site.cfg file to get one.

PS: OpenBLAS integration in other toolkits, such as Python based, promotes increased performance in the number of threads, on the same machine.

I just compile inside numpy

  1. Compiled OpenBLAS : $ git clone https://github.com/xianyi/OpenBLAS $ Cd OpenBLAS & amp; Amp; If you do not have administrator rights, then you can set PREFIX = in a directory. Where you are

  2. Make sure that the directory is libopenblas.so , it is in your shared library search path.

    • To do this locally, you can include your ~ / .bashrc file in the line

       < code> export LD_LIBRARY_PATH = / opt / OpenBLAS / lib: $ LD_LIBRARY_PATH   

      when you start a new terminal session LD_LIBRARY_PATH environment variable will be updated (< Code> $ source

    • Another option which will work for many users . < Etc / ld.so.conf.d / with the line / opt / OpenBLAS / lib , eg:

       < $> Sudo sh -c "echo '/ opt / openbl AS / lib' & gt; /etc/ld.so.conf.d/openblas.conf"     

      Once you have completed the same option, run

        $ sudo ldconfig    
    • Get the numpy source code:

        $ git clone http://www.github.com/numpy/numpy $ cd numpy    
    • Copy site.cfg.example to site.cfg and edit the copy:

        $ cp Site.cfg.example site.cfg $ nano site.cfg   

      Delete these lines:

        .... openblas libraries = openblas library_dirs = / Opt / openbLAs / lib include_dirs = / opt / ope NbLAs / include ....    
    • configuration, build, installation (optionally virtualenv )

       

      $ python setup.py configure

      output should look like this:

        ... openblas_info: fond: libraries = ['openbase 'Opanblos'] library_dirs = [ '/ opt / OpenBLAS / Lib'] language = c define_macros = [( 'HAVE_CBLAS', no)] Download: Laibrr Ies = [ 'openblas', 'openblas'] library_dirs = [ '/ Opt / OpenBLAS / lib'] language = c define_macros = [('HAVE_CBLAS', none)] ...   

      Installing with pip > Keep track of the package metadata and will allow you to easily uninstall, using the Python install.py to do Pip $ pip Install Optional: You can use to test performance for the calculation of different threads.

        $ OMP_NUM_THREADS = 1 python Build / test_numpy    py version: 1.10.0.dev0 + 8e026a2 maxint: 9223372036854775807 BLAS information: libraries [ ' Openblas ',' openblas '] *' library_dirs ['/ opt / OpenBLAS / lib'] * define_macros [('HAVE_CBLAS', none)] * language dot dot: 0.09977967 9 5845 seconds $ OMP_NUM_THREADS = 8 python / test_numpy Version: 1.10.0.dev0 + 8e026a2 maxint: 9223372036854775807 BLAS info: * libraries ['openblas', 'openblas'] * library_dirs ['/ opt / OpenBLAS / lib'] * define_macros [('HAVE_CBLAS', none)] * Language C-dot: .0439578056335 seconds     

      There is a marked improvement in it. Although exposure to Ch thread count, I do not really have been systematically tested, and it is likely that the performance advantages of a high thread count extra overhead for small matrix will outweigh.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -