
FYI: conversion to cython is in progress, see [1]. So far so good, but if any cython expert is around and has a spare minute, I would appreciate a feedback.
r.

It's done and merged to master at [1]. Testing welcome!
r.
On 09/23/11 19:18, Robert Cimrman wrote:
FYI: conversion to cython is in progress, see [1]. So far so good, but if any cython expert is around and has a spare minute, I would appreciate a feedback.
r.

On 10/14/11 17:00, Robert Cimrman wrote:
It's done and merged to master at [1]. Testing welcome!
Sorry, at [2] :) r.
[2] https://github.com/rc/sfepy
r.
On 09/23/11 19:18, Robert Cimrman wrote:
FYI: conversion to cython is in progress, see [1]. So far so good, but if any cython expert is around and has a spare minute, I would appreciate a feedback.
r.

On Fri, 2011-10-14 at 17:02 +0200, Robert Cimrman wrote:
On 10/14/11 17:00, Robert Cimrman wrote:
It's done and merged to master at [1]. Testing welcome!
Sorry, at [2] :) r.
[2] https://github.com/rc/sfepy
r.
Hi Robert, I am getting two errors during build:
osman@osman-AV019AA-ABA-p6228p:~/rc-sfepy-eccc564$ python setup.py build_ext --inplace You have version 0.10 of package "IPython" but we need version >= 0.10.0 ['sfepy', '/home/osman/rc-sfepy-eccc564/sfepy', '/home/osman/rc-sfepy-eccc564', '/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode', '/home/osman/rc-sfepy-eccc564', '/home/osman/local/lib/python2.6/site-packages/scikits.umfpack-5.1.0-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/scikits.umfpack-5.1.0-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/FiPy-2.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/PyQuante-1.6.4-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/Theano-0.4.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/mpmath-0.17-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Cheetah-2.4.4-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/Markdown-2.0.3-py2.6.egg', '/usr/lib/pymodules/python2.6', '/home/osman/Downloads/xmds2.0', '/usr/local/lib/python2.6/dist-packages/distribute-0.6.19-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/codepy-2011.1-py2.6.egg', '/home/osman/Work/FEniCS/lib/python2.6/site-packages', '/home/osman/local/lib/python2.6/site-packages', '/usr/local/lib/python2.6', '/home/osman/LMGC90v2/rev_2011/src/lmgc90-builds/LMGC90v2_dev/lib', '/home/osman/LMGC90v2/rev_2011/src/lmgc90-builds/LMGC90v2_dev/Pre', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/omniORB/COS', '/usr/lib/python2.6/dist-packages/openturns', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/lib/pymodules/python2.6/IPython/Extensions'] /usr/lib/python2.6/dist-packages/numpy/distutils/misc_util.pyc <----- Configuration of sfepy: data_files = [('sfepy/fem/extmods/sfepy/fem/extmods', ['sfepy/fem/extmods/version.h.in'])] ext_modules = [<numpy.distutils.extension.Extension instance at 0x3b4f4d0>, <numpy.distutils.extension.Extension instance at 0x3b4f950>, <numpy.distutils.extension.Extension instance at 0x3b4fb48>, <numpy.distutils.extension.Extension instance at 0x3b4fb90>, <numpy.distutils.extension.Extension instance at 0x3b4fb00>, <numpy.distutils.extension.Extension instance at 0x3b53b90>, <numpy.distutils.extension.Extension instance at 0x3b56050>, <numpy.distutils.extension.Extension instance at 0x3b56f38>] libraries = [('sfepy_common', {'extra_compiler_args': ['-g', '-O2'], 'extra_link_args': [], 'include_dirs': ['sfepy/fem/extmods', '/usr/include/python2.6'], 'macros': [('__SDIR__', '\'"sfepy/fem/extmods"\''), ('SFEPY_PLATFORM', 0)], 'sources': ['sfepy/fem/extmods/fmfield.c', 'sfepy/fem/extmods/geometry.c', 'sfepy/fem/extmods/geommech.c', 'sfepy/fem/extmods/common_python.c']}), ('sfepy_terms', {'depends': ['sfepy/fem/extmods/fmfield.c', 'sfepy/fem/extmods/geometry.c', 'sfepy/fem/extmods/geommech.c', 'sfepy/fem/extmods/common_python.c'], 'extra_compiler_args': ['-g', '-O2'], 'extra_link_args': [], 'include_dirs': ['sfepy/terms/extmods', 'sfepy/fem/extmods', '/usr/include/python2.6'], 'macros': [('__SDIR__', '\'"sfepy/terms/extmods"\''), ('SFEPY_PLATFORM', 0)], 'sources': ['sfepy/terms/extmods/termsLaplace.c', 'sfepy/terms/extmods/termsLinElasticity.c', 'sfepy/terms/extmods/termsSurface.c', 'sfepy/terms/extmods/termsBasic.c', 'sfepy/terms/extmods/termsAcoustic.c', 'sfepy/terms/extmods/termsBiot.c', 'sfepy/terms/extmods/termsHyperElasticity.c', 'sfepy/terms/extmods/termsElectric.c', 'sfepy/terms/extmods/termsPiezo.c', 'sfepy/terms/extmods/termsMass.c', 'sfepy/terms/extmods/formSDCC.c', 'sfepy/terms/extmods/termsNavierStokes.c', 'sfepy/terms/extmods/termsVolume.c', 'sfepy/terms/extmods/termsAdjointNavierStokes.c']})] name = 'sfepy' package_dir = {'sfepy': 'sfepy', 'sfepy.applications': 'sfepy/applications', 'sfepy.base': 'sfepy/base', 'sfepy.fem': 'sfepy/fem', 'sfepy.fem.extmods': 'sfepy/fem/extmods', 'sfepy.geom': 'sfepy/geom', 'sfepy.homogenization': 'sfepy/homogenization', 'sfepy.interactive': 'sfepy/interactive', 'sfepy.linalg': 'sfepy/linalg', 'sfepy.linalg.extmods': 'sfepy/linalg/extmods', 'sfepy.mechanics': 'sfepy/mechanics', 'sfepy.optimize': 'sfepy/optimize', 'sfepy.physics': 'sfepy/physics', 'sfepy.physics.extmods': 'sfepy/physics/extmods', 'sfepy.postprocess': 'sfepy/postprocess', 'sfepy.solvers': 'sfepy/solvers', 'sfepy.terms': 'sfepy/terms', 'sfepy.terms.extmods': 'sfepy/terms/extmods'} packages = ['sfepy', 'sfepy.applications', 'sfepy.base', 'sfepy.fem', 'sfepy.fem.extmods', 'sfepy.geom', 'sfepy.homogenization', 'sfepy.interactive', 'sfepy.linalg', 'sfepy.linalg.extmods', 'sfepy.mechanics', 'sfepy.optimize', 'sfepy.physics', 'sfepy.physics.extmods', 'sfepy.postprocess', 'sfepy.solvers', 'sfepy.terms', 'sfepy.terms.extmods'] py_modules = [('sfepy', '__config__', <function generate_config_py at 0x28370c8>)] -----> running build_ext running build_src building py_modules sources building library "sfepy_common" sources building library "sfepy_terms" sources building extension "sfepy.fem.extmods._fmfield" sources cythonc:> sfepy/fem/extmods/_fmfield.c
Error converting Pyrex file to C:
...
cdef int32 ele_extractNodalValuesDBD(FMField *out, FMField *_in,
int32 *conn)
cdef void array2fmfield4(FMField *out, np.ndarray[float64, mode='c', ndim=4] arr) ^
/home/osman/rc-sfepy-eccc564/sfepy/fem/extmods/_fmfield.pxd:142:49: Expected ']'
Error converting Pyrex file to C:
... # -*- Mode: Python -*- cimport cython
@cython.boundscheck(False) cdef inline void array2fmfield4(FMField *out, np.ndarray[float64, mode='c', ndim=4] arr): ^
/home/osman/rc-sfepy-eccc564/sfepy/fem/extmods/_fmfield.pyx:6:56: Expected ']' error: 2 errors while compiling 'sfepy/fem/extmods/_fmfield.pyx' with Cython
I have ubuntu 10.14 64 bit.
Regards, Osman

What is your cython version? I have 0.14.1, which works. Maybe the nice numpy support in cython is more recent than your version.
Regards, r.
On 10/16/11 23:45, osman wrote:
On Fri, 2011-10-14 at 17:02 +0200, Robert Cimrman wrote:
On 10/14/11 17:00, Robert Cimrman wrote:
It's done and merged to master at [1]. Testing welcome!
Sorry, at [2] :) r.
[2] https://github.com/rc/sfepy
r.
Hi Robert, I am getting two errors during build:
osman@osman-AV019AA-ABA-p6228p:~/rc-sfepy-eccc564$ python setup.py build_ext --inplace You have version 0.10 of package "IPython" but we need version>= 0.10.0 ['sfepy', '/home/osman/rc-sfepy-eccc564/sfepy', '/home/osman/rc-sfepy-eccc564', '/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode', '/home/osman/rc-sfepy-eccc564', '/home/osman/local/lib/python2.6/site-packages/scikits.umfpack-5.1.0-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/scikits.umfpack-5.1.0-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/FiPy-2.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/PyQuante-1.6.4-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/Theano-0.4.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/mpmath-0.17-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Cheetah-2.4.4-py2.6-linux-x86_64.egg', '/usr/local/lib/python2.6/dist-packages/Markdown-2.0.3-py2.6.egg', '/usr/lib/pymodules/python2.6', '/home/osman/Downloads/xmds2.0', '/usr/local/lib/python2.6/dist-packages/distribute-0.6.19-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/codepy-2011.1-py2.6.egg', '/home/osman/Work/FEniCS/lib/python2.6/site-packages', '/home/osman/local/lib/python2.6/site-packages', '/usr/local/lib/python2.6', '/home/osman/LMGC90v2/rev_2011/src/lmgc90-builds/LMGC90v 2_dev/lib', '/home/osman/LMGC90v2/rev_2011/src/lmgc90-builds/LMGC90v2_dev/Pre', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/omniORB/COS', '/usr/lib/python2.6/dist-packages/openturns', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/lib/pymodules/python2.6/IPython/Extensions'] /usr/lib/python2.6/dist-packages/numpy/distutils/misc_util.pyc <----- Configuration of sfepy: data_files = [('sfepy/fem/extmods/sfepy/fem/extmods', ['sfepy/fem/extmods/version.h.in'])] ext_modules = [<numpy.distutils.extension.Extension instance at 0x3b4f4d0>, <numpy.distutils.extension.Extension instance at 0x3b4f950>, <numpy.distutils.extension.Extension instance at 0x3b4fb48>, <numpy.distutils.extension.Extension instance at 0x3b4fb90>, <numpy.distutils.extension.Extension instance at 0x3b4fb00>, <numpy.distutils.extension.Extension instance at 0x3b53b90>, <numpy.distutils.extension.Extension instance at 0x3b56050>, <numpy.distutils.extension.Extension instance at 0x3b56f38>] libraries = [('sfepy_common', {'extra_compiler_args': ['-g', '-O2'], 'extra_link_args': [], 'include_dirs': ['sfepy/fem/extmods', '/usr/include/python2.6'], 'macros': [('__SDIR__', '\'"sfepy/fem/extmods"\''), ('SFEPY_PLATFORM', 0)], 'sources': ['sfepy/fem/extmods/fmfield.c', 'sfepy/fem/extmods/geometry.c', 'sfepy/fem/extmods/geommech.c', 'sfepy/fem/extmods/common_python.c']}), ('sfepy_terms', {'depends': ['sfepy/fem/extmods/fmfield.c', 'sfepy/fem/extmods/geometry.c', 'sfepy/fem/extmods/geommech.c', 'sfepy/fem/extmods/common_python.c'], 'extra_compiler_args': ['-g', '-O2'], 'extra_link_args': [], 'include_dirs': ['sfepy/terms/extmods', 'sfepy/fem/extmods', '/usr/include/python2.6'], 'macros': [('__SDIR__', '\'"sfepy/terms/extmods"\''), ('SFEPY_PLATFORM', 0)], 'sources': ['sfepy/terms/extmods/termsLaplace.c', 'sfepy/terms/extmods/termsLinElasticity.c', 'sfepy/terms/extmods/termsSurface.c', 'sfepy/terms/extmods/termsBasic.c', 'sfepy/terms/extmods/termsAcoustic.c', 'sfepy/terms/extmods/termsBiot.c', 'sfepy/terms/extmods/termsHyperElasticity.c', 'sfepy/terms/extmods/termsElectric.c', 'sfepy/terms/extmods/termsPiezo.c', 'sfepy/terms/extmods/termsMass.c', 'sfepy/terms/extmods/formSDCC.c', 'sfepy/terms/extmods/termsNavierStokes.c', 'sfepy/terms/extmods/termsVolume.c', 'sfepy/terms/extmods/termsAdjointNavierStokes.c']})] name = 'sfepy' package_dir = {'sfepy': 'sfepy', 'sfepy.applications': 'sfepy/applications', 'sfepy.base': 'sfepy/base', 'sfepy.fem': 'sfepy/fem', 'sfepy.fem.extmods': 'sfepy/fem/extmods', 'sfepy.geom': 'sfepy/geom', 'sfepy.homogenization': 'sfepy/homogenization', 'sfepy.interactive': 'sfepy/interactive', 'sfepy.linalg': 'sfepy/linalg', 'sfepy.linalg.extmods': 'sfepy/linalg/extmods', 'sfepy.mechanics': 'sfepy/mechanics', 'sfepy.optimize': 'sfepy/optimize', 'sfepy.physics': 'sfepy/physics', 'sfepy.physics.extmods': 'sfepy/physics/extmods', 'sfepy.postprocess': 'sfepy/postprocess', 'sfepy.solvers': 'sfepy/solvers', 'sfepy.terms': 'sfepy/terms', 'sfepy.terms.extmods': 'sfepy/terms/extmods'} packages = ['sfepy', 'sfepy.applications', 'sfepy.base', 'sfepy.fem', 'sfepy.fem.extmods', 'sfepy.geom', 'sfepy.homogenization', 'sfepy.interactive', 'sfepy.linalg', 'sfepy.linalg.extmods', 'sfepy.mechanics', 'sfepy.optimize', 'sfepy.physics', 'sfepy.physics.extmods', 'sfepy.postprocess', 'sfepy.solvers', 'sfepy.terms', 'sfepy.terms.extmods'] py_modules = [('sfepy', '__config__',<function generate_config_py at 0x28370c8>)] -----> running build_ext running build_src building py_modules sources building library "sfepy_common" sources building library "sfepy_terms" sources building extension "sfepy.fem.extmods._fmfield" sources cythonc:> sfepy/fem/extmods/_fmfield.c
Error converting Pyrex file to C:
...
cdef int32 ele_extractNodalValuesDBD(FMField *out, FMField *_in, int32 *conn)
cdef void array2fmfield4(FMField *out, np.ndarray[float64, mode='c', ndim=4] arr) ^
/home/osman/rc-sfepy-eccc564/sfepy/fem/extmods/_fmfield.pxd:142:49: Expected ']'
Error converting Pyrex file to C:
... # -*- Mode: Python -*- cimport cython
@cython.boundscheck(False) cdef inline void array2fmfield4(FMField *out, np.ndarray[float64, mode='c', ndim=4] arr): ^
/home/osman/rc-sfepy-eccc564/sfepy/fem/extmods/_fmfield.pyx:6:56: Expected ']' error: 2 errors while compiling 'sfepy/fem/extmods/_fmfield.pyx' with Cython
I have ubuntu 10.14 64 bit.
Regards, Osman

On Mon, 2011-10-17 at 10:31 +0200, Robert Cimrman wrote:
What is your cython version? I have 0.14.1, which works. Maybe the nice numpy support in cython is more recent than your version.
Regards, r. cython --version Cython version 0.12.1
I think this is from ubuntu repositories. I have not built it. I'll try building the most recent one and see if that solves the problem.
osman

On 10/17/11 13:23, osman wrote:
On Mon, 2011-10-17 at 10:31 +0200, Robert Cimrman wrote:
What is your cython version? I have 0.14.1, which works. Maybe the nice numpy support in cython is more recent than your version.
Regards, r. cython --version Cython version 0.12.1
I think this is from ubuntu repositories. I have not built it. I'll try building the most recent one and see if that solves the problem.
ok. I am not sure which is the minimal version required, I could not find this information of the cython web site, so I will set the minimum version check to 0.14.1 for the moment.
r.

On Mon, 2011-10-17 at 13:33 +0200, Robert Cimrman wrote:
On 10/17/11 13:23, osman wrote:
ok. I am not sure which is the minimal version required, I could not find this information of the cython web site, so I will set the minimum version check to 0.14.1 for the moment.
r.
I have finally taken the plunge and removed ubuntu supplied cython (version 0.12), and installed 0.15.1. Now I can build and install without errors. Testing gives:
59 test file(s) executed in 102.58 s, 0 failure(s) of 93 test(s)
regards osman

On Sun, 30 Oct 2011, osman wrote:
On Mon, 2011-10-17 at 13:33 +0200, Robert Cimrman wrote:
On 10/17/11 13:23, osman wrote:
ok. I am not sure which is the minimal version required, I could not find this information of the cython web site, so I will set the minimum version check to 0.14.1 for the moment.
I have finally taken the plunge and removed ubuntu supplied cython (version 0.12), and installed 0.15.1. Now I can build and install without errors. Testing gives:
59 test file(s) executed in 102.58 s, 0 failure(s) of 93 test(s)
Good, thanks for trying it!
r.
participants (2)
-
osman
-
Robert Cimrman