Re: [Cython] Cython 0.15 release candidate
On 25 July 2011 08:08, Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> wrote:
There are 4 NumPy-related test errors with Python 3.1 and 3.2. Output with Python 3.2:
====================================================================== ERROR: runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_bufacc_T155 ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 183, in _compile extra_postargs) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 911, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 165, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "runtests.py", line 678, in run self.runCompileTest() File "runtests.py", line 490, in runCompileTest self.test_directory, self.expect_errors, self.annotate) File "runtests.py", line 665, in compile self.run_distutils(test_directory, module, workdir, incdir) File "runtests.py", line 625, in run_distutils build_extension.run() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "runtests.py", line 257, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 511, in build_extension depends=ext.depends) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 576, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 188, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
====================================================================== ERROR: runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_cimport ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 183, in _compile extra_postargs) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 911, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 165, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "runtests.py", line 678, in run self.runCompileTest() File "runtests.py", line 490, in runCompileTest self.test_directory, self.expect_errors, self.annotate) File "runtests.py", line 665, in compile self.run_distutils(test_directory, module, workdir, incdir) File "runtests.py", line 625, in run_distutils build_extension.run() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "runtests.py", line 257, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 511, in build_extension depends=ext.depends) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 576, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 188, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
====================================================================== ERROR: runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_parallel ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 183, in _compile extra_postargs) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 911, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 165, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "runtests.py", line 678, in run self.runCompileTest() File "runtests.py", line 490, in runCompileTest self.test_directory, self.expect_errors, self.annotate) File "runtests.py", line 665, in compile self.run_distutils(test_directory, module, workdir, incdir) File "runtests.py", line 625, in run_distutils build_extension.run() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "runtests.py", line 257, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 511, in build_extension depends=ext.depends) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 576, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 188, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
====================================================================== ERROR: runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_test ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 183, in _compile extra_postargs) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 911, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib64/python3.2/distutils/spawn.py", line 165, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "runtests.py", line 678, in run self.runCompileTest() File "runtests.py", line 490, in runCompileTest self.test_directory, self.expect_errors, self.annotate) File "runtests.py", line 665, in compile self.run_distutils(test_directory, module, workdir, incdir) File "runtests.py", line 625, in run_distutils build_extension.run() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "runtests.py", line 257, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib64/python3.2/distutils/command/build_ext.py", line 511, in build_extension depends=ext.depends) File "/usr/lib64/python3.2/distutils/ccompiler.py", line 576, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib64/python3.2/distutils/unixccompiler.py", line 188, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
====================================================================== FAIL: test_nested_break_continue (line 331) (parallel.__test__) Doctest: parallel.__test__.test_nested_break_continue (line 331) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/doctest.py", line 2118, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_nested_break_continue (line 331) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/c/parallel.cpython-32.so", line unknown line number, in test_nested_break_continue (line 331)
---------------------------------------------------------------------- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/c/parallel.cpython-32.so", line ?, in parallel.__test__.test_nested_break_continue (line 331) Failed example: test_nested_break_continue() Expected: 6 7 6 7 8 Got: 6 0 -1160725808 -1160725808 8
====================================================================== FAIL: test_propagation (line 49) (parallel.__test__) Doctest: parallel.__test__.test_propagation (line 49) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/doctest.py", line 2118, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_propagation (line 49) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/c/parallel.cpython-32.so", line unknown line number, in test_propagation (line 49)
---------------------------------------------------------------------- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/c/parallel.cpython-32.so", line ?, in parallel.__test__.test_propagation (line 49) Failed example: test_propagation() Expected: (9, 9, 9, 9, 450, 450) Got: (9, 0, 9, -1160725808, 0, 0)
====================================================================== FAIL: test_nested_break_continue (line 331) (parallel.__test__) Doctest: parallel.__test__.test_nested_break_continue (line 331) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/doctest.py", line 2118, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_nested_break_continue (line 331) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/cpp/parallel.cpython-32.so", line unknown line number, in test_nested_break_continue (line 331)
---------------------------------------------------------------------- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/cpp/parallel.cpython-32.so", line ?, in parallel.__test__.test_nested_break_continue (line 331) Failed example: test_nested_break_continue() Expected: 6 7 6 7 8 Got: 6 0 -1160725808 -1160725808 8
====================================================================== FAIL: test_propagation (line 49) (parallel.__test__) Doctest: parallel.__test__.test_propagation (line 49) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.2/doctest.py", line 2118, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for parallel.__test__.test_propagation (line 49) File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/cpp/parallel.cpython-32.so", line unknown line number, in test_propagation (line 49)
---------------------------------------------------------------------- File "/var/tmp/portage/dev-python/cython-0.15_rc0/work/Cython-0.15rc0/tests-3.2/run/cpp/parallel.cpython-32.so", line ?, in parallel.__test__.test_propagation (line 49) Failed example: test_propagation() Expected: (9, 9, 9, 9, 450, 450) Got: (9, 0, 9, -1160725808, 0, 0)
---------------------------------------------------------------------- Ran 5528 tests in 1476.755s
FAILED (failures=4, errors=4) ALL DONE
-- Arfrever Frehtes Taifersar Arahesis
_______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev
Unfortunately the output of the testrunner is rather useless here. Could you run the tests with --no-cleanup and attach the .c and .cpp files (found in build/run/c/numpy_cimport.c, etc)? I think something is up with your numpy version and headers. The numpy tests should be automatically skipped if numpy is not available. As for the parallel tests, the values of lastprivates were racy after breaking, returning or propagating exceptions. I pushed a fix to https://github.com/markflorisson88/cython/commit/d9aceb672910796c3952340ab4b... . If you want and have the time Dag, you could have a look. I'll push it to cython master later today.
2011-07-26 13:00:10 mark florisson napisał(a):
Unfortunately the output of the testrunner is rather useless here. Could you run the tests with --no-cleanup and attach the .c and .cpp files (found in build/run/c/numpy_cimport.c, etc)? I think something is up with your numpy version and headers. The numpy tests should be automatically skipped if numpy is not available.
I have found the following lines in earlier part of output: runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void numpy_bufacc_T155 () Doctest: numpy_bufacc_T155 ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void numpy_cimport () Doctest: numpy_cimport ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void numpy_test () Doctest: numpy_test ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR Relevant source files: http://people.apache.org/~Arfrever/numpy_bufacc_T155.c http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp http://people.apache.org/~Arfrever/numpy_cimport.c http://people.apache.org/~Arfrever/numpy_cimport.cpp http://people.apache.org/~Arfrever/numpy_parallel.c http://people.apache.org/~Arfrever/numpy_parallel.cpp http://people.apache.org/~Arfrever/numpy_test.c http://people.apache.org/~Arfrever/numpy_test.cpp -- Arfrever Frehtes Taifersar Arahesis
On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> wrote:
2011-07-26 13:00:10 mark florisson napisał(a):
Unfortunately the output of the testrunner is rather useless here. Could you run the tests with --no-cleanup and attach the .c and .cpp files (found in build/run/c/numpy_cimport.c, etc)? I think something is up with your numpy version and headers. The numpy tests should be automatically skipped if numpy is not available.
I have found the following lines in earlier part of output:
runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void numpy_bufacc_T155 () Doctest: numpy_bufacc_T155 ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void numpy_cimport () Doctest: numpy_cimport ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void numpy_test () Doctest: numpy_test ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR
Relevant source files:
http://people.apache.org/~Arfrever/numpy_bufacc_T155.c http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp http://people.apache.org/~Arfrever/numpy_cimport.c http://people.apache.org/~Arfrever/numpy_cimport.cpp http://people.apache.org/~Arfrever/numpy_parallel.c http://people.apache.org/~Arfrever/numpy_parallel.cpp http://people.apache.org/~Arfrever/numpy_test.c http://people.apache.org/~Arfrever/numpy_test.cpp
-- Arfrever Frehtes Taifersar Arahesis
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
The compiler complains about the init function of the module, not sure why, but the line numbers don't seem to correspond with the files you provided. The tests run fine for me on both osx, fedora, and ubuntu, all with different gcc versions, so I'm assuming something is wrong with your setup. Thanks for your report though! Feel free to retry using the latest checkout from master (https://github.com/cython/cython). Robert, I'm done with documentation and updates.
2011-07-29 20:51:11 mark florisson napisał(a):
On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> wrote:
2011-07-26 13:00:10 mark florisson napisał(a):
Unfortunately the output of the testrunner is rather useless here. Could you run the tests with --no-cleanup and attach the .c and .cpp files (found in build/run/c/numpy_cimport.c, etc)? I think something is up with your numpy version and headers. The numpy tests should be automatically skipped if numpy is not available.
I have found the following lines in earlier part of output:
runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void numpy_bufacc_T155 () Doctest: numpy_bufacc_T155 ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void numpy_cimport () Doctest: numpy_cimport ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR runTest (__main__.CythonRunTestCase) compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void numpy_test () Doctest: numpy_test ... ok runTest (__main__.CythonRunTestCase) compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ ERROR
Relevant source files:
http://people.apache.org/~Arfrever/numpy_bufacc_T155.c http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp http://people.apache.org/~Arfrever/numpy_cimport.c http://people.apache.org/~Arfrever/numpy_cimport.cpp http://people.apache.org/~Arfrever/numpy_parallel.c http://people.apache.org/~Arfrever/numpy_parallel.cpp http://people.apache.org/~Arfrever/numpy_test.c http://people.apache.org/~Arfrever/numpy_test.cpp
The compiler complains about the init function of the module, not sure why, but the line numbers don't seem to correspond with the files you provided. The tests run fine for me on both osx, fedora, and ubuntu, all with different gcc versions, so I'm assuming something is wrong with your setup.
Actually line numbers correspond to the files provided by me. You probably tested with Python 2 instead of Python 3. The files generated by Cython contain this line: import_umath(); numpy/__ufunc_api.h defines (see 'return' at the end): #define import_umath() { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); return; }} pyport.h of Python 2.* defines: #define PyMODINIT_FUNC void pyport.h of Python 3.* defines: #define PyMODINIT_FUNC PyObject* -- Arfrever Frehtes Taifersar Arahesis
Looks very much like a numpy-on-py3 bug to me. (NumPy has an RC up currently as well, it'd be good to test them together but don't think I have time this weekend...) Do you know if the problem is there with Cython 0.14? Even if not, it could simply be that the test cases now exercise more of NumPy and nothing to do with Cython... Try copying over the numpy test cases from 0.15 and run them with Cython 0.14 perhaps (sorry that I don't have time to look into this myself now). At any rate, I think this is unlikely to be a Cython regression. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> wrote: 2011-07-29 20:51:11 mark florisson napisał(a): > On 29 July 2011 19:18, Arfrever Frehtes Taifersar Arahesis > <arfrever.fta@gmail.com> wrote: > > 2011-07-26 13:00:10 mark florisson napisał(a): > >> Unfortunately the output of the testrunner is rather useless here. > >> Could you run the tests with --no-cleanup and attach the .c and .cpp > >> files (found in build/run/c/numpy_cimport.c, etc)? I think something > >> is up with your numpy version and headers. The numpy tests should be > >> automatically skipped if numpy is not available. > > > > I have found the following lines in earlier part of output: > > > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_bufacc_T155 ... numpy_bufacc_T155.c: In function ‘PyInit_numpy_bufacc_T155’: > > numpy_bufacc_T155.c:3652:5: warning: ‘return’ with no value, in function returning non-void > > numpy_bufacc_T155 () > > Doctest: numpy_bufacc_T155 ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_bufacc_T155 ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_bufacc_T155.cpp: In function ‘PyObject* PyInit_numpy_bufacc_T155()’: > > numpy_bufacc_T155.cpp:3652:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_cimport ... numpy_cimport.c: In function ‘PyInit_numpy_cimport’: > > numpy_cimport.c:3327:5: warning: ‘return’ with no value, in function returning non-void > > numpy_cimport () > > Doctest: numpy_cimport ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_cimport ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_cimport.cpp: In function ‘PyObject* PyInit_numpy_cimport()’: > > numpy_cimport.cpp:3327:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_parallel ... numpy_parallel.c: In function ‘PyInit_numpy_parallel’: > > numpy_parallel.c:3824:5: warning: ‘return’ with no value, in function returning non-void > > test_parallel_numpy_arrays (line 11) (numpy_parallel.__test__) > > Doctest: numpy_parallel.__test__.test_parallel_numpy_arrays (line 11) ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_parallel ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_parallel.cpp: In function ‘PyObject* PyInit_numpy_parallel()’: > > numpy_parallel.cpp:3824:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > runTest (__main__.CythonRunTestCase) > > compiling (c) and running numpy_test ... numpy_test.c: In function ‘PyInit_numpy_test’: > > numpy_test.c:11604:5: warning: ‘return’ with no value, in function returning non-void > > numpy_test () > > Doctest: numpy_test ... ok > > runTest (__main__.CythonRunTestCase) > > compiling (cpp) and running numpy_test ... cc1plus: warning: command line option "-Wpointer-sign" is valid for C/ObjC but not for C++ > > numpy_test.cpp: In function ‘PyObject* PyInit_numpy_test()’: > > numpy_test.cpp:11604:5: error: return-statement with no value, in function returning ‘PyObject*’ > > ERROR > > > > Relevant source files: > > > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.c > > http://people.apache.org/~Arfrever/numpy_bufacc_T155.cpp > > http://people.apache.org/~Arfrever/numpy_cimport.c > > http://people.apache.org/~Arfrever/numpy_cimport.cpp > > http://people.apache.org/~Arfrever/numpy_parallel.c > > http://people.apache.org/~Arfrever/numpy_parallel.cpp > > http://people.apache.org/~Arfrever/numpy_test.c > > http://people.apache.org/~Arfrever/numpy_test.cpp > > The compiler complains about the init function of the module, not sure > why, but the line numbers don't seem to correspond with the files you > provided. The tests run fine for me on both osx, fedora, and ubuntu, > all with different gcc versions, so I'm assuming something is wrong > with your setup. Actually line numbers correspond to the files provided by me. You probably tested with Python 2 instead of Python 3. The files generated by Cython contain this line: import_umath(); numpy/__ufunc_api.h defines (see 'return' at the end): #define import_umath() { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); return; }} pyport.h of Python 2.* defines: #define PyMODINIT_FUNC void pyport.h of Python 3.* defines: #define PyMODINIT_FUNC PyObject* -- Arfrever Frehtes Taifersar Arahesis_____________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
2011-07-29 23:23:46 Dag Sverre Seljebotn napisał(a):
Looks very much like a numpy-on-py3 bug to me.
I have reported: http://projects.scipy.org/numpy/ticket/1919 (NumPy-related tests in Cython pass with Python 3.*, when NumPy has been built with the patch from this ticket applied.) -- Arfrever Frehtes Taifersar Arahesis
On Sat, Jul 30, 2011 at 10:57 AM, Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> wrote:
2011-07-29 23:23:46 Dag Sverre Seljebotn napisał(a):
Looks very much like a numpy-on-py3 bug to me.
I have reported: http://projects.scipy.org/numpy/ticket/1919 (NumPy-related tests in Cython pass with Python 3.*, when NumPy has been built with the patch from this ticket applied.)
Thanks for looking into this.
participants (4)
-
Arfrever Frehtes Taifersar Arahesis -
Dag Sverre Seljebotn -
mark florisson -
Robert Bradshaw