[Numpy-discussion] Revisiting numpy/scipy on 64 bit OSX

Robert Kern robert.kern@gmail....
Fri Aug 22 09:58:23 CDT 2008


On Fri, Aug 22, 2008 at 07:00, Chris Kees
<christopher.e.kees@usace.army.mil> wrote:
> I've been experimenting with both a non-framework, non-universal 64-bit
> build and a 4-way universal build of the python (2.6) trunk with numpy
> 1.1.1. The non-framework 64 build appears to give me exactly the same
> results from numpy.test() as the standard 32-bit version (as well as
> allowing large arrays like numpy.zeros((1000,1000,1000),'d') ), which is
>
> <unittest._TextTestResult run=1300 errors=0 failures=0>
>
> Our numerical models also seem to run fine with it using 8-16G. The 4-way
> universal python gives the same results in 32-bit  but when running in
> 64-bit I get an error in the tests below, which I haven't had time to look
> at.  It also gives the error
>
>>>> a = numpy.zeros((1000,1000,1000),'d')
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> ValueError: dimensions too large.

Much of our configuration occurs by compiling small C programs and
executing them. Probably, one of these got run in 32-bit mode, and
that fooled the numpy build into thinking that it was for 32-bit only.
Unfortunately, what you are trying to do is tantamount to
cross-compiling, and neither distutils nor the additions we have built
on top of it work very well with cross-compiling. It's possible that
we could special case the configuration on OS X, though. Instead of
trusting the results of the executables, we can probably recognize
each of the 4 OS X variants through #ifdefs and reset the discovered
results. This isn't easily extended to all platforms (which is why we
went with the executable approach in the first place), but OS X on
both 32-bit and 64-bit will be increasingly common but still
manageable. I would welcome contributions in this area.


-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the Numpy-discussion mailing list