<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 </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 2:14 PM, Daπid <span dir="ltr"><<a 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 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 href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
> <a 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 href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a 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>