I understand that intel mkl uses openMP parallel model. Therefore I set environment variable
>>os.environ['OMP_NUM_THREADS'] = '4' With same test example, however, still one cpu is used. Do I need any specifications when I run numpy with intel MKL (MKL9.1)? numpy developers would be able to answer this question? I changed the name of numpy-discussion thread to "Numpy & MKL" attempting to draw attentions from wide range of readers. Thanks! Sue On Thu, Jan 7, 2010 at 11:20 AM, Xue (Sue) Yang <x.y...@physics.usyd.edu.au> wrote: > This time, only one cpu was used. Does it mean that our installed intel mkl > 9.1 is not threaded? You would have to consult the MKL documentation - I believe you can control how many threads are used from an environment variable. Also, the exact build commands depend on the version of the MKL, as its libraries often change between versions. David > Thank you for the reply which is useful. > > I also tried to Install numpy with intel mkl 9.1 > I still used gfortran for numpy installation as intel mkl 9.1 supports > gnu compiler. > > I only uncomment these lines for site.cfg in site.cfg.example > > [mkl] > library_dirs = /usr/physics/intel/mkl/lib/32 > include_dirs = /usr/physics/intel/mkl/include > lapack_libs = mkl_lapack > > then I tested the numpy with > > > python > >>import numpy > >>a = numpy.random.randn(6000, 6000) > >>numpy.dot(a, a) > > This time, only one cpu was used. Does it mean that our installed > intel mkl 9.1 is not threaded? > I don't think so. We have used it for openMP parallelization for quite > a while. > > Thanks! > > Sue _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion