-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade numpy to 1.5.0 and scipy to 0.8 #9808
Comments
comment:1
I have now workable spkg files for the both packages. I host the files at megaupload, at: I think the problem is the same as described in Trac # 7791 (#7791 ) I get the following errors:
What's this? |
comment:2
numpy 1.5.0rc1: http://www.megaupload.com/?d=KK31RSZV |
comment:3
I don't think that we should upgrade to 1.5.0rc1 -- we should do 1.4.1 for now and wait until 1.5 is released. |
comment:4
Replying to @mwhansen:
That has to be double checked but maldun says he needs features in 1.5. |
comment:5
The warnings go away after rebuilding the source. @mwhansen, fbissey |
comment:6
If 1.5.0rc1 is merged, #7166 can be closed. I don't know about 1.4.1, but in any case that is not a critical bug. Some time back I made a Solaris-specific change to Numpy, as I wanted to get it reviewed with the least hassle - that generally means making it Solaris specific, as reviewers are easier to please if it only effects a rarer platform. But I think the change should be implemented on OS X too. Currently there's a really nasty hack on OS X to build Numpy, that involves a script called The far neater option is the way I did it on Solaris. I suggest the changes I made for Solaris are implemented whenever If you want, I can create a patch. |
comment:7
Replying to @sagetrac-drkirkby:
would be nice! But first I have to sort some things out, I hope it will get ready soon... |
comment:8
Looking at all that stuff in the spkg and comparing to Gentoo. Not very pretty.
An extract of the Gentoo set up:
Actually here is the full set up that you might find interesting:
The other patches we have are relatively minor, a fix to the f2py man page, The NUMPY_FCONFIG is passed to distutils as an argument of
i.e. in the end what we do boils down to "python setup.py install ${NUMPY_FCONFIG}". Can you point me to your solaris fix Dave? |
comment:9
Replying to @kiwifb:
What a surprise.
I've never understood the need for this A Fortran compiler is still shipped on OS X, but I don't see why the variable
On Solaris, and some OS X versions, if you want a 64-bit build, you must add the compiler flag Someone came up with a fix for this which was implemented only on OS X, that involved creating a wrapper script called Since they had done this only on OS X, it did not work on Solaris. So I came up with a solution for Solaris, but I avoided the wrapper script. Instead I set the variable to I'm attaching a patch, which basically uses the Solaris on any system, including OS X. I think this is the sensible way to do it, not have a wrapper script. I've not tested the attached patch - not even on Solaris!! But I think you can see what I am trying to do. I was going to try to explain it in words, but a bit of code, even if untested, should be more sensible. |
Attachment: 9808-remove-gcc_fake.patch.gz An untested patch, which makes Numpy build the same was on OS X as it does on Solaris or other platforms where SAGE64=yes. It removes the stupid wrapper script. |
comment:10
Ok - so we still use g95 on some targets. So we need to keep some patches |
comment:11
Replying to @kiwifb:
I don't believe g95 is used anywhere. There are g95 binaries in the Fortran package in Sage, but William said they can be removed. There is a gfortran binary. So as far as I'm aware, all g95 stuff can be removed, but Dave |
comment:12
Replying to @sagetrac-drkirkby:
That's good! That means we probably can give the shove to the gnu.py and init.py There is a comment in SPKG.txt:
I cannot find the file in question in that location. There is however a numpy.pxi under src/numpy/random/mtrand but I am not sure that's the file in question. |
comment:13
FYI: Numpy 1.5 has been officially released now. |
comment:14
Replying to @kiwifb:
I think I was the one that added those instructions, and I'm pretty sure they're obsolete instructions now. I believe we took care of merging the differences between the two numpy.pxi/pxd files a while ago. |
comment:15
Replying to @jasongrout:
Thank you for the confirmation. I have done some cleaning to numpy's spkg-install and it seems to work as intended on my machine. I guess we'll update to 1.5 and give it a spin. |
comment:16
Replying to @kiwifb:
In general though, we should not be upgrading to pre-release versions just because one person needs a feature that's only available in a pre-release. Everyone should not have to suffer the extra risks a pre-release gives unless there are compelling arguments for it. I realise in this case 1.5 has since been released, so it's immaterial now. Dave |
comment:17
Replying to @sagetrac-drkirkby:
+1 |
comment:18
Replying to @sagetrac-drkirkby:
Yes, I didn't think it would be worth working on that particular version if it wasn't |
comment:19
Replying to @jasongrout:
So I was right =) Til I'm done with 1.5.0rc1 1.5 is out... So changed so far: The following doctest had to be rewritten:
That was easy =) The next prob was:
that was also easy. defmatrix just changed from numpy.core to numpy.matrix to numpy.matrixlib Here comes now a trickier one:
This is not the only one, but the root of evil seems to be in real_roots (how ironic...) |
comment:21
Update: Found the problem. see: http://groups.google.com/group/cython-users/browse_thread/thread/624c696293b7fe44 It seems that all versions 1.5.x hold this bug.... I will now apply the patch from drkirkby, pack it again, test it overnight and hopefully we are done with 1.4.1, and hopefully they get it right in the next time. perhaps I should send the numpy/scipy guys the doctests I've done so far scipy 0.8. don't seem to make any problems so far |
comment:23
an doctest I oversaw:
The output is now:
But since it's an extension, and no downgrade it is also no prob |
This comment has been minimized.
This comment has been minimized.
comment:287
Updates: my doctest failure in citation.pyx is a "red herring". In particular, it's not because of the patches here; it's because of a flaw in how the function get_systems works. Often when I've been testing the packages and patches on this ticket, I've created a new version of sage in a directory called "numpy", and get_systems sees that string in the path name and adds "numpy" to the systems used by the particular command. If I rename the directory to something else, then the doctest passes. So let's not worry about this; at some point, someone can fix get_systems so it ignores the initial chunk of the path name (ignore the parent of SAGE_ROOT, for example). My doctest failure in matrix1.pyx is still there. For some reason, the "Datetime" type codes are not there on some systems. Any ideas why? I glanced at the install log for numpy, but I didn't see anything suspicious, not that I really know what to look for. Here's the log from my OS X 10.6 machine, which is one place I see this problem: http://sage.math.washington.edu/home/palmieri/misc/numpy-1.5.0.log. Finally, I have a new version of the scipy spkg, which works for me on all of the machines I've tested on: linux, OpenSolaris, Solaris on x86, Mac OS X 10.6. I'm putting the link in the ticket description, and I'm posting the Mercurial patch -- it's very small. I'm leaving this as "needs work" because of the matrix1.pyx issue, but I think that's the only remaining problem. Please test the new scipy spkg on other systems to make sure, though. |
for reference only: diff between old scipy 0.8 spkg and new one |
comment:288
Attachment: trac_9808-scipy.patch.gz See #10129 for the citation.pyx issue. |
comment:289
@jhpalmieri I looked again on your matrix1.pyx problem, and this really interesting if you look on comment #23 ( #9808 comment:23 ) we already had this change in linux also, but in numpy-1.4.1 and it vanished for numpy-1.5.0 again. So whatever happen in Mac OS X it appears like an old numpy output comes up again, and if you look at it carefully it actually isn't really an error, more like that more keywords are available. So perhaps it has something to do with the numpy installation of numpy itself on OS X. (perhaps another bug of numpy) |
comment:290
Replying to @sagetrac-maldun:
It looked to me like the "Datetime" keywords were missing, rather than more being available, but I might be wrong.
I also see this on OpenSolaris, for what that's worth. In any case, it's not a big deal, is it? Can we just change the doctest somehow? |
comment:291
lol I have the picture now: it seemed you installed my old patch which inherits the datetime change which was left from numpy-1.4.1 If you try the new patch trac_9808_changed_doctests.patch in the attachement instead of The one which is at fault here is the wiki: I overrided the file, but the wiki let you download the old patch. |
This comment has been minimized.
This comment has been minimized.
comment:293
Okay, I understand. I don't know if it's the wiki's fault or mine: I may have just been using an old copy of the patch file which I had on my computer. Anyway, I'm trying again now. I've marked this "needs review", but things are looking pretty good now. |
comment:294
With the new spkgs and the new patch, all tests pass for me (except for known unrelated failures) on skynet machines eno (linux), lena (linux), and fulvia (Solaris on x86). The build on mark (Solaris on sparc) is ongoing; it's a very slow machine. All tests also pass on my OS X 10.6 box and on Dave Kirkby's OpenSolaris machine hawk, as well as on sage.math. Is this enough for a positive review? I guess not quite: since I prepared the most recent scipy spkg, someone else should definitely review the changes (given in attachment: trac_9808-scipy.patch) and test it out. |
comment:295
I was able to successfully install both packages on my slowest PPC OS X system; doing ./sage -b after touching the include will take a while, and I would have to wait until Monday to do all tests. But I will at least test devel/sage/sage/matrix/, devel/sage/sage/functions/, devel/sage/sage/finance/, and devel/sage/sage/numerical, because those use Scipy and Numpy a lot and are NOT eons to test. Certainly the patch makes sense. I can't check now whether the spkg was correctly created and whether it has any changes not checked in, but assuming all is well, this should be considered a successful, if long, process. And I hope 1.5.1 won't come out the day after - though it looks like the Enthought folks are already looking to 2.0 as well. |
comment:296
Okay, these tests (which are most of the numpy/scipy ones in Sage, though not all) are passing fine, with the expected errors (I didn't apply the patch, but am seeing precisely what is in the patch). Great! I also checked this now
from the latest package John posted. Positive review! |
comment:297
Replying to @kcrisman:
I've never thought I will read those words... I think I need a beer now 8) The patch also works on Sage-4.6.alpha3 on Ubuntu. (Which was expected, but it is better to check too often then one time too less) Thanks to everyone who worked on this ticket! I'm quite the beginner, but I think I learned a lot by helping upgrading numpy and can finally going back working on #9706 which should be a lot easier, but I needed the update to complete this task, because the new scipy holds a lot new features for orthogonal polynomials. Kind regards, |
comment:298
Kudos to you guys! (and 3 more comments to reach 300!) |
comment:300
Congratulations, I got exhausted just trying to follow this! |
Changed reviewer from Karl-Dieter Crisman, David Kirkby, Leif Leonhardy, Francois Bissey to Karl-Dieter Crisman, David Kirkby, Leif Leonhardy, François Bissey |
Changed author from Stefan Reiterer, Francois Bissey, John Palmieri, David Kirkby, Karl-Dieter Crisman to Stefan Reiterer, François Bissey, John Palmieri, David Kirkby, Karl-Dieter Crisman |
Merged: sage-4.6.1.alpha0 |
comment:303
Replying to @jhpalmieri:
Just for the record: The easiest (and by the way more efficient and less error-prone) way to test for e.g. Darwin 8 / MacOS X 10.4 / Tiger is to use the (Bourne) shell's built-in pattern matching: case "$UNAME" in # set in sage-env
Darwin)
case "`uname -r`" in # quotes not mandatory
8*) # Tiger / 10.4
...
;;
9*) # Leopard / 10.5
...
;;
10*) # Snow Leopard / 10.6
...
;;
*) # other, "default"
...
esac
# add other OSs like Linux here if appropriate
esac Or, if you want to use os_with_ver=`uname -sr | sed -e 's/ /-/g'` # order of options to 'uname' doesn't matter
os_with_ver_and_arch=`uname -srm | tr ' ' '-'` # using the simpler 'tr'(anslate) command
case $os_with_ver in
Darwin-8*) # Tiger / Darwin 8 / MacOS X 10.4
...
;;
...
esac
# More specific:
case $os_with_ver_and_arch in
Darwin-8*-ppc) # Tiger / Darwin 8 / MacOS X 10.4 on PPC (32-bit)
...
;;
Darwin-9*-ppc64) # Leopard / Darwin 9 / MacOS X 10.5 on PPC (64-bit)
...
;;
Linux-*-x86_64|Linux-*-ia64) # Any 64-bit Linux version on Intel
...
;;
Linux-*-i[3456]86) # Any 32-bit Linux version on Intel
...
;;
...
esac |
This ticket updates two packages, which must be updated together,
http://sage.math.washington.edu/home/kcrisman/numpy-1.5.0.spkg
http://sage.math.washington.edu/home/palmieri/SPKG/scipy-0.8.spkg
If you are applying these to any version before Sage 4.6.alpha3, then you also have to update the scipy_sandbox package too (#10092). This has been merged in 4.6.alpha3, though.
http://boxen.math.washington.edu/home/kirkby/patches/scipy_sandbox-20071020.p7.spkg
After installing Numpy, one needs to execute sage -ba, or do
or else one will get runtime warnings. (Or if someone wants less hassle, they can patch sage-4.6.alpha3.spkg before building Sage).
trac_9808_changed_doctests.patch in the attachment has to be applied, in order to get all doctests running because some of the output has changed.
For reviewers:
changes.txt holds a summary of all changes with reference to the diffs, and links to other tickets
Upstream: Fixed upstream, but not in a stable release.
Component: packages: standard
Keywords: numpy, scipy
Author: Stefan Reiterer, François Bissey, John Palmieri, David Kirkby, Karl-Dieter Crisman
Reviewer: Karl-Dieter Crisman, David Kirkby, Leif Leonhardy, François Bissey
Merged: sage-4.6.1.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/9808
The text was updated successfully, but these errors were encountered: