[Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?
Wed Jun 4 22:07:15 CDT 2008
2008/6/4 Dan Yamins <firstname.lastname@example.org>:
>> In : numpy.dtype(numpy.uintp).itemsize
>> Out: 4
>> which is the size in bytes of the integer needed to hold a pointer. The
>> output above is for 32 bit python/numpy.
> Check, the answer is 4, as you got for the 32-bit. What would the answer
> be on a 64-bit architecture? Why is this diagnostic?
In a 64-bit setting, a pointer needs to be 64 bits long, that is,
eight bytes, not four.
What Charles pointed out was that while the inner product is very big,
it seems to fit into memory on his 32-bit Linux machine; is it
possible that OSX is preventing your python process from using even
the meager 2-3 GB that a 32-bit process ought to get? In particular,
try running Charles' script in a fresh python interpreter and see if
it works; it may be that other arrays you had allocated are taking up
some of the space that this one could.
You will probably still want a 64-bit python, though, in order to have
a little elbow room.
More information about the Numpy-discussion