<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 20/03/2013 10:29 AM, Jens Nielsen
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAM-Pw024HQQGooWdfFAvT_ig7JrEWMSZG07ACnu+53q20sFfbg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi, 
        <div><br>
        </div>
        <div style="">Could also be that they are linked to different
          libs such as atlas and standart Blas. What is the output of </div>
        <div style="">numpy.show_config() in the two different python
          versions. </div>
        <div style=""><br>
        </div>
        <div style="">Jens <br>
        </div>
      </div>
    </blockquote>
    <big><big>Thanks for this pointer.<br>
        The result for Py2.7:<br>
      </big></big>
    <blockquote><big><big>>>> numpy.show_config()<br>
          atlas_threads_info:<br>
            NOT AVAILABLE<br>
          blas_opt_info:<br>
              libraries = ['f77blas', 'cblas', 'atlas']<br>
              library_dirs = ['C:\\local\\lib\\yop\\sse3']<br>
              define_macros = [('NO_ATLAS_INFO', -1)]<br>
              language = c<br>
          atlas_blas_threads_info:<br>
            NOT AVAILABLE<br>
          lapack_opt_info:<br>
              libraries = ['lapack', 'f77blas', 'cblas', 'atlas']<br>
              library_dirs = ['C:\\local\\lib\\yop\\sse3']<br>
              define_macros = [('NO_ATLAS_INFO', -1)]<br>
              language = f77<br>
          atlas_info:<br>
              libraries = ['lapack', 'f77blas', 'cblas', 'atlas']<br>
              library_dirs = ['C:\\local\\lib\\yop\\sse3']<br>
              define_macros = [('NO_ATLAS_INFO', -1)]<br>
              language = f77<br>
          lapack_mkl_info:<br>
            NOT AVAILABLE<br>
          blas_mkl_info:<br>
            NOT AVAILABLE<br>
          atlas_blas_info:<br>
              libraries = ['f77blas', 'cblas', 'atlas']<br>
              library_dirs = ['C:\\local\\lib\\yop\\sse3']<br>
              define_macros = [('NO_ATLAS_INFO', -1)]<br>
              language = c<br>
          mkl_info:<br>
            NOT AVAILABLE<br>
          >>></big></big><br>
    </blockquote>
    <big><big>The result for 3.2:<br>
      </big></big>
    <blockquote><big><big>>>> import numpy<br>
          >>> numpy.show_config()<br>
          lapack_info:<br>
            NOT AVAILABLE<br>
          lapack_opt_info:<br>
            NOT AVAILABLE<br>
          blas_info:<br>
            NOT AVAILABLE<br>
          atlas_threads_info:<br>
            NOT AVAILABLE<br>
          blas_src_info:<br>
            NOT AVAILABLE<br>
          atlas_blas_info:<br>
            NOT AVAILABLE<br>
          lapack_src_info:<br>
            NOT AVAILABLE<br>
          atlas_blas_threads_info:<br>
            NOT AVAILABLE<br>
          blas_mkl_info:<br>
            NOT AVAILABLE<br>
          blas_opt_info:<br>
            NOT AVAILABLE<br>
          atlas_info:<br>
            NOT AVAILABLE<br>
          lapack_mkl_info:<br>
            NOT AVAILABLE<br>
          mkl_info:<br>
            NOT AVAILABLE<br>
          >>><br>
        </big></big></blockquote>
    <big><big>I hope that this helps.<br>
        <br>
        Colin W.<br>
      </big></big>
    <blockquote
cite="mid:CAM-Pw024HQQGooWdfFAvT_ig7JrEWMSZG07ACnu+53q20sFfbg@mail.gmail.com"
      type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Mar 20, 2013 at 2:14 PM, Daπid
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:davidmenhur@gmail.com" target="_blank">davidmenhur@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Without
            much detailed knowledge of the topic, I would expect both<br>
            versions to give very similar timing, as it is essentially a
            call to<br>
            ATLAS function, not much is done in Python.<br>
            <br>
            Given this, maybe the difference is in ATLAS itself. How
            have you<br>
            installed it? When you compile ATLAS, it will do some
            machine-specific<br>
            optimisation, but if you have installed a binary chances are
            that your<br>
            version is optimised for a machine quite different from
            yours. So, two<br>
            different installations could have been compiled in
            different machines<br>
            and so one is more suited for your machine. If you want to
            be sure, I<br>
            would try to compile ATLAS (this may be difficult) or check
            the same<br>
            on a very different machine (like an AMD processor,
            different<br>
            architecture...).<br>
            <br>
            <br>
            <br>
            Just for reference, on Linux Python 2.7 64 bits can deal
            with these<br>
            matrices easily.<br>
            <br>
            %timeit mat=np.random.random((6143,6143)); matinv=
            np.linalg.inv(mat);<br>
            res = np.dot(mat, matinv); diff= res-np.eye(6143); print<br>
            np.sum(np.abs(diff))<br>
            2.41799631031e-05<br>
            1.13955868701e-05<br>
            3.64338191541e-05<br>
            1.13484781021e-05<br>
            1 loops, best of 3: 156 s per loop<br>
            <br>
            Intel i5, 4 GB of RAM and SSD. ATLAS installed from Fedora
            repository<br>
            (I don't run heavy stuff on this computer).<br>
            <div>
              <div class="h5"><br>
                On 20 March 2013 14:46, Colin J. Williams <<a
                  moz-do-not-send="true" href="mailto:cjw@ncf.ca">cjw@ncf.ca</a>>
                wrote:<br>
                > I have a small program which builds random matrices
                for increasing matrix<br>
                > orders, inverts the matrix and checks the precision
                of the product.  At some<br>
                > point, one would expect operations to fail, when
                the memory capacity is<br>
                > exceeded.  In both Python 2.7 and 3.2 matrices of
                order 3,071 area handled,<br>
                > but not 6,143.<br>
                ><br>
                > Using wall-clock times, with win32, Python 3.2 is
                slower than Python 2.7.<br>
                > The profiler indicates a problem in the solver.<br>
                ><br>
                > Done on a Pentium, with 2.7 GHz processor, 2 GB of
                RAM and 221 GB of free<br>
                > disk space.  Both Python 3.2.3 and Python 2.7.3 use
                numpy 1.6.2.<br>
                ><br>
                > The results are show below.<br>
                ><br>
                > Colin W.<br>
                ><br>
                > aaaa_ssss<br>
                > 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500
                32 bit (Intel)]<br>
                > order=    2   measure ofimprecision= 0.097   Time
                elapsed (seconds)=<br>
                > 0.004143<br>
                > order=    5   measure ofimprecision= 2.207   Time
                elapsed (seconds)=<br>
                > 0.001514<br>
                > order=   11   measure ofimprecision= 2.372   Time
                elapsed (seconds)=<br>
                > 0.001455<br>
                > order=   23   measure ofimprecision= 3.318   Time
                elapsed (seconds)=<br>
                > 0.001608<br>
                > order=   47   measure ofimprecision= 4.257   Time
                elapsed (seconds)=<br>
                > 0.002339<br>
                > order=   95   measure ofimprecision= 4.986   Time
                elapsed (seconds)=<br>
                > 0.005747<br>
                > order=  191   measure ofimprecision= 5.788   Time
                elapsed (seconds)=<br>
                > 0.029974<br>
                > order=  383   measure ofimprecision= 6.765   Time
                elapsed (seconds)=<br>
                > 0.145339<br>
                > order=  767   measure ofimprecision= 7.909   Time
                elapsed (seconds)=<br>
                > 0.841142<br>
                > order= 1535   measure ofimprecision= 8.532   Time
                elapsed (seconds)=<br>
                > 5.793630<br>
                > order= 3071   measure ofimprecision= 9.774   Time
                elapsed (seconds)=<br>
                > 39.559540<br>
                > order=  6143 Process terminated by a MemoryError<br>
                ><br>
                > Above: 2.7.3  Below: Python 3.2.3<br>
                ><br>
                > bbb_bbb<br>
                > 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500
                32 bit (Intel)]<br>
                > order=    2   measure ofimprecision= 0.000   Time
                elapsed (seconds)=<br>
                > 0.113930<br>
                > order=    5   measure ofimprecision= 1.807   Time
                elapsed (seconds)=<br>
                > 0.001373<br>
                > order=   11   measure ofimprecision= 2.395   Time
                elapsed (seconds)=<br>
                > 0.001468<br>
                > order=   23   measure ofimprecision= 3.073   Time
                elapsed (seconds)=<br>
                > 0.001609<br>
                > order=   47   measure ofimprecision= 5.642   Time
                elapsed (seconds)=<br>
                > 0.002687<br>
                > order=   95   measure ofimprecision= 5.745   Time
                elapsed (seconds)=<br>
                > 0.013510<br>
                > order=  191   measure ofimprecision= 5.866   Time
                elapsed (seconds)=<br>
                > 0.061560<br>
                > order=  383   measure ofimprecision= 7.129   Time
                elapsed (seconds)=<br>
                > 0.418490<br>
                > order=  767   measure ofimprecision= 8.240   Time
                elapsed (seconds)=<br>
                > 3.815713<br>
                > order= 1535   measure ofimprecision= 8.735   Time
                elapsed (seconds)=<br>
                > 27.877270<br>
                > order= 3071   measure ofimprecision= 9.996   Time
                elapsed<br>
                > (seconds)=212.545610<br>
                > order=  6143 Process terminated by a MemoryError<br>
                ><br>
                ><br>
                ><br>
              </div>
            </div>
            > _______________________________________________<br>
            > NumPy-Discussion mailing list<br>
            > <a moz-do-not-send="true"
              href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
            > <a moz-do-not-send="true"
              href="http://mail.scipy.org/mailman/listinfo/numpy-discussion"
              target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
            ><br>
            _______________________________________________<br>
            NumPy-Discussion mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
            <a moz-do-not-send="true"
              href="http://mail.scipy.org/mailman/listinfo/numpy-discussion"
              target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NumPy-Discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/numpy-discussion">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>