Opened 10 years ago

Closed 7 years ago

#7831 closed defect (duplicate)

numpy-1.5.0 fixes for FreeBSD

Reported by: pjeremy Owned by: pjeremy
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting: BSD Keywords:
Cc: Merged in:
Authors: Reviewers: Stephen Montgomery-Smith
Report Upstream: None of the above - read trac for reasoning. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by pjeremy)

  • By default, numpy references threaded atlas libraries, as well as a custom variant on the lapack library, on FreeBSD. The reasoning behind this is unclear - there is nothing in the numpy documentation to indicate whether a threaded or non-threaded atlas is needed and the publicly available SVN logs do not mention this code. A query to the numpy mailing list elicited a response that either threaded or non-threaded atlas can be used and suggesting that the special-casing for FreeBSD may be obsolete. By default, atlas is built non-threaded and r-2.6.1.p23 assumes a non-threaded atlas and fails when only the threaded libraries are installed. Based on this, the special casing for FreeBSD was removed from numpy - it now uses the same libraries irrespective of the host OS. This part of the patch could potentially be integrated upstream but this has not been done yet.
  • A patch to spkg-install is required to ensure that the <math.h> in $SAGE_LOCAL/include is used in place of the system <math.h>, otherwise the additional maths functions provided by cephes are not prototyped, leading to lots of "implicit declaration" warnings whilst compiling (eg) numpy/core/src/npymath/npy_math_complex.c.src

Attachments (1)

7831.numpy.patch (988 bytes) - added by pjeremy 9 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 10 years ago by pjeremy

  • Status changed from new to needs_review

comment:2 Changed 10 years ago by mhansen

  • Reviewers set to Mike Hansen
  • Status changed from needs_review to positive_review

These changes look good to me. Could you look over the ones at #7321? I'll handle making an spkg with all of these rolled together.

Thanks!

comment:3 Changed 10 years ago by mvngu

  • Reviewers changed from Mike Hansen to Mike Hansen, Minh Van Nguyen
  • Status changed from positive_review to needs_work

Updated spkg at

http://sage.math.washington.edu/home/mvngu/spkg/standard/numpy/numpy-1.3.0.p3.spkg

which incorporates the patch 7831.numpy.patch. This spkg needs review by anyone other than me.

comment:4 Changed 10 years ago by mvngu

  • Status changed from needs_work to needs_review

comment:5 Changed 9 years ago by mhansen

  • Status changed from needs_review to positive_review

Looks fine. The the changes based on the newest spkg are at

http://sage.math.washington.edu/home/mhansen/numpy-1.3.0.p4.spkg

comment:6 Changed 9 years ago by rlm

There is another ticket updating numpy as well: #8010. These two conflicting spkg's need to be resolved.

comment:7 Changed 9 years ago by rlm

  • Status changed from positive_review to needs_work

comment:8 Changed 9 years ago by kcrisman

Since #8010 has been closed, it would be helpful to know whether the changes here are still needed (which I can't test, unfortunately).

comment:9 Changed 9 years ago by flawrence

Can someone verify whether this is fixed by other changes to the numpy package in 4.6.1alpha0?

comment:10 Changed 9 years ago by pjeremy

  • Description modified (diff)
  • Summary changed from numpy-1.3.0.p2 fixes for FreeBSD to numpy-1.5.0 fixes for FreeBSD

The init.py changes don't appear to be needed any longer but the remaining fixes are still required.

Changed 9 years ago by pjeremy

comment:11 Changed 9 years ago by kcrisman

Note that numpy 1.5.1 is on the way to Sage - #10792. It would be great to get this incorporated with that.

comment:12 Changed 8 years ago by kcrisman

Apparently Stephen Montgomery-Smith has had some success with this recently as a "port".

comment:13 Changed 7 years ago by kcrisman

  • Status changed from needs_work to needs_info

More success at this thread. Checking whether it was with a system version or Sage version.

comment:14 Changed 7 years ago by kcrisman

  • Authors Peter Jeremy deleted
  • Milestone changed from sage-5.1 to sage-duplicate/invalid/wontfix
  • Reviewers Mike Hansen, Minh Van Nguyen deleted
  • Status changed from needs_info to needs_review

Just noting here that although this was the Sage version, Numpy upstream still has the special FreeBSD code, here as of June 2012, so the patch definitely hasn't been applied. My sense is that probably the R upgrades over the years is what made this obsolete.

So I'm putting this to positive review as it builds (and so does R) and passes the overwhelming majority of tests on FreeBSD 8 and 9, but leaving this info here in case in certain unusual cases this ends up being a problem after all.

comment:15 Changed 7 years ago by kcrisman

  • Reviewers set to Stephen Montgomery-Smith
  • Status changed from needs_review to positive_review

comment:16 Changed 7 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.