scipy 0.4.4 problems with converters.blitz
Hi, I've got problems getting inline code to work after having updated from 0.3.2 to 0.4.4. Automatic argument conversion with converters.blitz fails (try the array3d.py example) with this error message: In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:31, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/bzconfig.h:39:32: blitz/gnu/bzconfig.h: No such file or directory In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script) I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help. Any ideas what is wrong? Regards, Christian
Quoting Christian Kristukat <ckkart@hoc.net>:
Hi, I've got problems getting inline code to work after having updated from 0.3.2 to 0.4.4. Automatic argument conversion with converters.blitz fails (try the array3d.py example) with this error message:
In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:31, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/bzconfig.h:39:32: blitz/gnu/bzconfig.h: No such file or directory In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
What _exact_ gcc version are you using? Not only are there issues with blitz and weave, there may also be gcc version problems here. gcc4 has a neverending stream of major problems. Cheers, f
Fernando.Perez@colorado.edu wrote:
Quoting Christian Kristukat <ckkart@hoc.net>:
Hi, I've got problems getting inline code to work after having updated from 0.3.2 to 0.4.4. Automatic argument conversion with converters.blitz fails (try the array3d.py example) with this error message:
In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:31, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/bzconfig.h:39:32: blitz/gnu/bzconfig.h: No such file or directory In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
What _exact_ gcc version are you using? Not only are there issues with blitz and weave, there may also be gcc version problems here. gcc4 has a neverending stream of major problems.
gcc 3.3.4 Regards, Christian
Christian Kristukat wrote:
Any ideas what is wrong?
What _exact_ gcc version are you using? Not only are there issues with blitz and weave, there may also be gcc version problems here. gcc4 has a neverending stream of major problems.
gcc 3.3.4
Mmh. Then, no clue from my part right now, I'm afraid. Sorry, f
Fernando.Perez@colorado.edu wrote:
Quoting Christian Kristukat <ckkart@hoc.net>:
Hi, I've got problems getting inline code to work after having updated from 0.3.2 to 0.4.4. Automatic argument conversion with converters.blitz fails (try the array3d.py example) with this error message:
In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:31, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/bzconfig.h:39:32: blitz/gnu/bzconfig.h: No such file or directory In file included from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/blitz.h:47, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array-impl.h:41, from /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/array.h:32, from /home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
Try moving the gnu/bzconfig.h file from the installation directory to the weave directory /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/gnu Then try again. We may be missing some files when the upgrade in blitz occurred. -Travis
On Fri, 27 Jan 2006, Travis Oliphant wrote:
/home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
Try moving the gnu/bzconfig.h file from the installation directory to the weave directory
/usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/gnu
Then try again.
We may be missing some files when the upgrade in blitz occurred.
Indeed, scipy/Lib/weave/blitz/blitz/gnu is an empty directory in scipy SVN. Pearu
Pearu Peterson <pearu@scipy.org> writes:
On Fri, 27 Jan 2006, Travis Oliphant wrote:
/home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
Try moving the gnu/bzconfig.h file from the installation directory to the weave directory
/usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/gnu
Then try again.
We may be missing some files when the upgrade in blitz occurred.
Indeed, scipy/Lib/weave/blitz/blitz/gnu is an empty directory in scipy SVN.
Fixed. I added the bzconfig.h that I had used when I updated it last. -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca
David M. Cooke wrote:
Pearu Peterson <pearu@scipy.org> writes:
On Fri, 27 Jan 2006, Travis Oliphant wrote:
/home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong? Try moving the gnu/bzconfig.h file from the installation directory to the weave directory
/usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/gnu
Then try again.
We may be missing some files when the upgrade in blitz occurred. Indeed, scipy/Lib/weave/blitz/blitz/gnu is an empty directory in scipy SVN.
Fixed. I added the bzconfig.h that I had used when I updated it last.
Thanks! That works. Unfortunately the inline code that used to work before still doesn't compile. It seems to be related to the support code I'm using. In the error message below dist(double, double, int, double) is a function of the support code. Have there been changes to weave that I'm not aware of? /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’: /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1910: note: candidate 1: typename blitz::SliceInfo<P_numtype, T1, T2, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection>::T_slice blitz::Array<T, N>::operator()(T1, T2) const [with T1 = long int, T2 = int, P_numtype = double, int N_rank = 2] /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1637: note: candidate 2: P_numtype& __restrict__ blitz::Array<T, N>::operator()(int, int) [with P_numtype = double, int N_rank = 2] /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: cannot convert ‘blitz::Array<double, 0>’ to ‘double’ for argument ‘2’ to ‘double dist(double, double, int, double)’ Regards, Christian
On Sun, Jan 29, 2006 at 03:29:03PM +0100, Christian Kristukat wrote:
Thanks! That works. Unfortunately the inline code that used to work before still doesn't compile. It seems to be related to the support code I'm using. In the error message below dist(double, double, int, double) is a function of the support code. Have there been changes to weave that I'm not aware of?
/home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’: /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1910: note: candidate 1: typename blitz::SliceInfo<P_numtype, T1, T2, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection>::T_slice blitz::Array<T, N>::operator()(T1, T2) const [with T1 = long int, T2 = int, P_numtype = double, int N_rank = 2] /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1637: note: candidate 2: P_numtype& __restrict__ blitz::Array<T, N>::operator()(int, int) [with P_numtype = double, int N_rank = 2] /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: cannot convert ‘blitz::Array<double, 0>’ to ‘double’ for argument ‘2’ to ‘double dist(double, double, int, double)’
Don't you just love C++'s clear and descriptive compiler error's? This error also popped up in my code after a compiler upgrade (to GCC4, IIRC). Seems that GCC4 is a lot more pedantic than 3.2. You should be able to work around the problem by casting the value before passing it to your function, i.e. dist(static_cast<double>(whatever_you_had_here), ...) I had the problem with a function being called like dist(3, 4, 1, 1); which would only compile if I did dist(3.0, 4.0, 1, 1.0); in order to explicitly make the parameters doubles. Or maybe I'm totally off track, but it was worth a try! Regards Stéfan
Stefan van der Walt wrote:
On Sun, Jan 29, 2006 at 03:29:03PM +0100, Christian Kristukat wrote:
Thanks! That works. Unfortunately the inline code that used to work before still doesn't compile. It seems to be related to the support code I'm using. In the error message below dist(double, double, int, double) is a function of the support code. Have there been changes to weave that I'm not aware of?
/home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’: /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1910: note: candidate 1: typename blitz::SliceInfo<P_numtype, T1, T2, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection, blitz::nilArraySection>::T_slice blitz::Array<T, N>::operator()(T1, T2) const [with T1 = long int, T2 = int, P_numtype = double, int N_rank = 2] /usr/lib/python2.4/site-packages/scipy/weave/blitz/blitz/array-impl.h:1637: note: candidate 2: P_numtype& __restrict__ blitz::Array<T, N>::operator()(int, int) [with P_numtype = double, int N_rank = 2] /home/ck/.python24_compiled/sc_9824b12a96792c10b5fdb725f9caa3c44.cpp:837: error: cannot convert ‘blitz::Array<double, 0>’ to ‘double’ for argument ‘2’ to ‘double dist(double, double, int, double)’
Don't you just love C++'s clear and descriptive compiler error's? This error also popped up in my code after a compiler upgrade (to GCC4, IIRC). Seems that GCC4 is a lot more pedantic than 3.2. You should be able to work around the problem by casting the value before passing it to your function, i.e.
dist(static_cast<double>(whatever_you_had_here), ...)
I had the problem with a function being called like
dist(3, 4, 1, 1);
which would only compile if I did
dist(3.0, 4.0, 1, 1.0);
in order to explicitly make the parameters doubles.
Or maybe I'm totally off track, but it was worth a try!
Good idea! But it seems like I have to cast to a different type. Can you help me with that error message? I've no idea of C++. For me it looks like he's trying to convert a 0-dim array (=scalar ?) to a double, right? error: invalid static_cast from type `blitz::Array<double, 0>' to type `double' Regards, Christian
On Mon, Jan 30, 2006 at 11:08:33AM +0100, Christian Kristukat wrote:
Good idea! But it seems like I have to cast to a different type. Can you help me with that error message? I've no idea of C++. For me it looks like he's trying to convert a 0-dim array (=scalar ?) to a double, right?
error: invalid static_cast from type `blitz::Array<double, 0>' to type `double'
Array<double,0> is still an array -- not a double. I assume you obtained it by doing something similar to blitz::Array<double,1> x(3); x = 1,2,3; dist(x(blitz::Range(2,2)), ...) Try specifying that you need element 0 of that cut, i.e. dist(x(blitz::Range(2,2))(0), ...) If that does not help, please post the offending piece of code. Cheers Stéfan
Any chance we could get a minor version bump to fix this and the dtypechar/dtype.char bug in Lib/weave/standard_array_spec.py (both already fixed in svn)? These two changes get my weave test code and then I can release my darwinports package. Thanks, -e David M. Cooke wrote:
Pearu Peterson <pearu@scipy.org> writes:
On Fri, 27 Jan 2006, Travis Oliphant wrote:
/home/ck/.python23_compiled/sc_9824b12a96792c10b5fdb725f9caa3c414.cpp:5: /usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/compiler.h:38:6: #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
I've tried to install Blitz 0.9, so that at least weave can find the header file "gnu/bzconfig.h" but it didn't really help.
Any ideas what is wrong?
Try moving the gnu/bzconfig.h file from the installation directory to the weave directory
/usr/lib/python2.3/site-packages/scipy/weave/blitz/blitz/gnu
Then try again.
We may be missing some files when the upgrade in blitz occurred.
Indeed, scipy/Lib/weave/blitz/blitz/gnu is an empty directory in scipy SVN.
Fixed. I added the bzconfig.h that I had used when I updated it last.
Erick Tryzelaar wrote:
Any chance we could get a minor version bump to fix this and the dtypechar/dtype.char bug in Lib/weave/standard_array_spec.py (both already fixed in svn)? These two changes get my weave test code and then I can release my darwinports package. Thanks,
I think this is a good idea. The most recent release (0.4.4) also isn't compatible with the latest NumPy (0.9.4). I could work on making a new release this weekend if people agree. -- Ed
Ed Schofield wrote:
Erick Tryzelaar wrote:
Any chance we could get a minor version bump to fix this and the dtypechar/dtype.char bug in Lib/weave/standard_array_spec.py (both already fixed in svn)? These two changes get my weave test code and then I can release my darwinports package. Thanks,
I think this is a good idea. The most recent release (0.4.4) also isn't compatible with the latest NumPy (0.9.4). I could work on making a new release this weekend if people agree.
I'll roll out NumPy 0.9.5 at the same time so we have two versions that work together. There have been some bug-fixes and a few (minor) feature changes. But, I am running out of numbers for 1.0 release :-) -Travis
Travis Oliphant wrote:
Ed Schofield wrote:
I think this is a good idea. The most recent release (0.4.4) also isn't compatible with the latest NumPy (0.9.4). I could work on making a new release this weekend if people agree.
I'll roll out NumPy 0.9.5 at the same time so we have two versions that work together. There have been some bug-fixes and a few (minor) feature changes. But, I am running out of numbers for 1.0 release :-)
That sounds good :) How about a stream of 1.0 release candidates for Numpy, starting with 1.0-rc1? For what it's worth, I think we should exercise some patience and caution before releasing a 1.0 version of NumPy, because this is likely to signify an API freeze. The recent dtype changes are a case in point -- the API is cleaner now, but the change required many small changes in SciPy. SciPy is lucky to have helpful developers close to NumPy too, but some other projects won't be able to respond as quickly to compatibility-breaking improvements. Some things I have in mind: stronger type-checking for unsafe casts, and ensuring operations on matrices return matrices ... ;) -- Ed
participants (9)
-
Christian Kristukat -
cookedm@physics.mcmaster.ca -
Ed Schofield -
Erick Tryzelaar -
Fernando Perez -
Fernando.Perez@colorado.edu -
Pearu Peterson -
Stefan van der Walt -
Travis Oliphant