Re: [Cython] [cython-users] Re: Cython 0.17 beta 1 released

2012-07-31 Thread Stefan Behnel
mark florisson, 28.07.2012 14:04:
> On 27 July 2012 23:30, Bradley Froehle wrote:
>> Thanks to the work of Yaroslav Halchenko, there is an experimental Debian
>> package for Cython 0.17.beta1 -- http://packages.qa.debian.org/c/cython.html
>>
>> However, the builds are showing a lot of test failures on non-amd64 sytems.
>> See https://buildd.debian.org/status/package.php?p=cython&suite=experimental
>> Many of the errors seem related to assumptions made about the sizes of
>> various integers (int vs. long vs long long).  Ideally we'll be able to
>> clean up these failures before the final release.
> 
> Thanks, I think it's mostly the tests that are wrong. I'll try to get
> it fixed on linux 32 bit.

I'm not sure the it's only the tests. The "char" vs. "unsigned char" errors
hint at platform specific differences, which might trigger bugs (aka.
incorrect assumptions) in the generated memory view code. Specifically,
plain "char" is unsigned at least on ARM and PowerPC, both of which fail
with this error.

Stefan

___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] help getting NumPy into a 32-bit Jenkins build environment

2012-07-31 Thread Lisandro Dalcin
On 28 July 2012 06:37, Stefan Behnel  wrote:
> Hi,
>
> I've been trying to set up a 32bit build environment on Jenkins. Most of it
> works nicely by just switching to "gcc -m32", but NumPy fails to build with
> that setup due to the lack of dependencies. It actually finds them when
> looking for their header files in the wrong (64bit) places, and then fails
> to build when it can't find the expected 32bit libraries.
>
> Is there a way to tell NumPy that I really don't care about BLAS, LAPACK
> and all of its friends and just want bare arrays? Or is there an easy way
> to install 32 bit versions of those dependencies on sage.math? I'd be fine
> with having them built and installed into a local directory (namely, in
> standard directory layout under /home/scoder/jenkins/Tools/libs32/).
>

>From doc/source/user/install.rst in numpy-dev:


Disabling ATLAS and other accelerated libraries
---

Usage of ATLAS and other accelerated libraries in Numpy can be disabled
via::

BLAS=None LAPACK=None ATLAS=None python setup.py build




-- 
Lisandro Dalcin
---
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] [cython-users] Re: Cython 0.17 beta 1 released

2012-07-31 Thread Robert Bradshaw
On Tue, Jul 31, 2012 at 7:24 AM, Stefan Behnel  wrote:
> mark florisson, 28.07.2012 14:04:
>> On 27 July 2012 23:30, Bradley Froehle wrote:
>>> Thanks to the work of Yaroslav Halchenko, there is an experimental Debian
>>> package for Cython 0.17.beta1 -- http://packages.qa.debian.org/c/cython.html
>>>
>>> However, the builds are showing a lot of test failures on non-amd64 sytems.
>>> See https://buildd.debian.org/status/package.php?p=cython&suite=experimental
>>> Many of the errors seem related to assumptions made about the sizes of
>>> various integers (int vs. long vs long long).  Ideally we'll be able to
>>> clean up these failures before the final release.
>>
>> Thanks, I think it's mostly the tests that are wrong. I'll try to get
>> it fixed on linux 32 bit.
>
> I'm not sure the it's only the tests. The "char" vs. "unsigned char" errors
> hint at platform specific differences, which might trigger bugs (aka.
> incorrect assumptions) in the generated memory view code. Specifically,
> plain "char" is unsigned at least on ARM and PowerPC, both of which fail
> with this error.

Yes, I think somewhere we're assuming char is signed, but wasn't able
to see where in my quick investigations.

On another note, I updated jenkins to the latest release of Sage (5.2)
and all seems well.

- Robert
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] [cython-users] Re: Cython 0.17 beta 1 released

2012-07-31 Thread Stefan Behnel
Robert Bradshaw, 31.07.2012 19:24:
> On Tue, Jul 31, 2012 at 7:24 AM, Stefan Behnel wrote:
>> mark florisson, 28.07.2012 14:04:
>>> On 27 July 2012 23:30, Bradley Froehle wrote:
 Thanks to the work of Yaroslav Halchenko, there is an experimental Debian
 package for Cython 0.17.beta1 -- 
 http://packages.qa.debian.org/c/cython.html

 However, the builds are showing a lot of test failures on non-amd64 sytems.
 See 
 https://buildd.debian.org/status/package.php?p=cython&suite=experimental
 Many of the errors seem related to assumptions made about the sizes of
 various integers (int vs. long vs long long).  Ideally we'll be able to
 clean up these failures before the final release.
>>>
>>> Thanks, I think it's mostly the tests that are wrong. I'll try to get
>>> it fixed on linux 32 bit.
>>
>> I'm not sure the it's only the tests. The "char" vs. "unsigned char" errors
>> hint at platform specific differences, which might trigger bugs (aka.
>> incorrect assumptions) in the generated memory view code. Specifically,
>> plain "char" is unsigned at least on ARM and PowerPC, both of which fail
>> with this error.
> 
> Yes, I think somewhere we're assuming char is signed, but wasn't able
> to see where in my quick investigations.

Yes, it wasn't immediately obvious to me either. Here is a patch that
*might* fix the issue - obviously untested for the platforms in question.

Yaroslav, could you give it a try on the Debian build servers?

Stefan

diff -r 0d14a856f2cd Cython/Compiler/Buffer.py
--- a/Cython/Compiler/Buffer.py	Tue Jul 31 20:05:37 2012 +0200
+++ b/Cython/Compiler/Buffer.py	Tue Jul 31 21:10:13 2012 +0200
@@ -680,32 +680,25 @@
 rep = str(dtype)
 
 flags = "0"
-
+is_unsigned = "0"
 if dtype.is_int:
-if dtype.signed == 0:
-typegroup = 'U'
-else:
-typegroup = 'I'
+is_unsigned = "IS_UNSIGNED(%s)" % declcode
+typegroup = "%s ? 'U' : 'I'" % is_unsigned
 elif complex_possible or dtype.is_complex:
-typegroup = 'C'
+typegroup = "'C'"
 elif dtype.is_float:
-typegroup = 'R'
+typegroup = "'R'"
 elif dtype.is_struct:
-typegroup = 'S'
+typegroup = "'S'"
 if dtype.packed:
 flags = "__PYX_BUF_FLAGS_PACKED_STRUCT"
 elif dtype.is_pyobject:
-typegroup = 'O'
+typegroup = "'O'"
 else:
 assert False
 
-if dtype.is_int:
-is_unsigned = "IS_UNSIGNED(%s)" % declcode
-else:
-is_unsigned = "0"
-
 typeinfo = ('static __Pyx_TypeInfo %s = '
-'{ "%s", %s, sizeof(%s), { %s }, %s, \'%s\', %s, %s };')
+'{ "%s", %s, sizeof(%s), { %s }, %s, %s, %s, %s };')
 tup = (name, rep, structinfo_name, declcode,
', '.join([str(x) for x in arraysizes]) or '0', len(arraysizes),
typegroup, is_unsigned, flags)
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel