Skip to content
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 to Pynac-0.7.7 #22969

Closed
rwst opened this issue May 10, 2017 · 20 comments
Closed

Upgrade to Pynac-0.7.7 #22969

rwst opened this issue May 10, 2017 · 20 comments

Comments

@rwst
Copy link

rwst commented May 10, 2017

Pynac-0.7.7 changes:

https://github.com/pynac/pynac/releases/download/pynac-0.7.7/pynac-0.7.7.tar.bz2

Depends on #23001

Component: packages: standard

Author: Ralf Stephan

Branch/Commit: c1cff2d

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/22969

@rwst rwst added this to the sage-8.0 milestone May 10, 2017
@rwst
Copy link
Author

rwst commented May 10, 2017

Branch: u/rws/upgrade_to_pynac_0_7_7

@rwst

This comment has been minimized.

@rwst
Copy link
Author

rwst commented May 10, 2017

New commits:

3aca19122969: pynac-0.7.7 version/chksum/delete old patch
894c5f222969: doctest fixes

@rwst
Copy link
Author

rwst commented May 10, 2017

Commit: 894c5f2

@rwst
Copy link
Author

rwst commented May 10, 2017

Author: Ralf Stephan

@tscrim
Copy link
Collaborator

tscrim commented May 10, 2017

comment:3

LGTM. Off to the buildbots.

@tscrim
Copy link
Collaborator

tscrim commented May 10, 2017

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented May 14, 2017

comment:4

On OSX:

sage -t --long src/sage/functions/log.py
**********************************************************************
File "src/sage/functions/log.py", line 434, in sage.functions.log.Function_polylog.__init__
Failed example:
    polylog(2, 1.0)
Expected:
    NaN
Got:
    NaN + NaN*I
**********************************************************************
File "src/sage/functions/log.py", line 436, in sage.functions.log.Function_polylog.__init__
Failed example:
    polylog(2.0, 1.0)
Expected:
    NaN
Got:
    NaN + NaN*I
**********************************************************************
1 item had failures:
   2 of  26 in sage.functions.log.Function_polylog.__init__
    [271 tests, 2 failures, 9.23 s]

@rwst
Copy link
Author

rwst commented May 15, 2017

comment:5

The difference may be due to different results from cmp(RBF(NaN),1) on OSX (?, Linux gives 1) but it shows things can be done better in other parts of the computation.

@rwst
Copy link
Author

rwst commented May 15, 2017

comment:6

There will be a new release, specifically usage of PyObject_Cmp will be phased out.

I hope the following is False on OSX too, as my attempt to fix the above depends on it:

sage: RBF(NaN)._richcmp_(RBF(1),0)
False

If this is different then we'll depend on #23001 for a fix.

@rwst
Copy link
Author

rwst commented May 15, 2017

comment:7

The difference may be due to different results from cmp(RBF(NaN),1) on OSX (?, Linux gives 1) but it shows things can be done better in other parts of the computation.

No this is not the reason.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 16, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

0203090Merge branch 'develop' into t/22969/upgrade_to_pynac_0_7_7
a6ac3d623001: is_NaN for elements of CC, CDF, CIF
ca839ea23001: is_NaN for ball fields
5f8b70323001: NaN back-conversion with interval fields
920e5ad23001: Back-convert complex NaN (NaN+NaN*I) to the resp. real field
33b3163Merge branch 'u/rws/implement_is_nan_for_all_rings_with_nan_elements' of git://trac.sagemath.org/sage into t/22969/upgrade_to_pynac_0_7_7
c1cff2d22969: apply commits b65c3f7bd and ece8bd967 from future pynac

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 16, 2017

Changed commit from 894c5f2 to c1cff2d

@rwst
Copy link
Author

rwst commented May 16, 2017

comment:9

OK, no new release, but I added a patch and it all depends on #23001. I'm pretty sure this fixes the issue which was very poor programming---I relied on undefined behaviour to get the right result.

@rwst
Copy link
Author

rwst commented May 16, 2017

Dependencies: #23001

@tscrim
Copy link
Collaborator

tscrim commented May 16, 2017

comment:10

Back to the buildbots.

@kiwifb
Copy link
Member

kiwifb commented May 17, 2017

comment:11

Doesn't build for me with the added patch

libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wno-unused-parameter -march=native -O2 -pipe -std=gnu++11 -c numeric.cpp  -fPIC -DPIC -o .libs/libpynac_la-numeric.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from basic.h:26,
                 from numeric.h:49,
                 from numeric.cpp:55:
/usr/include/python2.7/pyconfig.h:1193:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /usr/include/stdlib.h:24:0,
                 from /usr/include/flint/fmpz.h:37,
                 from numeric.cpp:52:
/usr/include/features.h:225:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 200809L
 ^
In file included from /usr/include/python2.7/Python.h:8:0,
                 from basic.h:26,
                 from numeric.h:49,
                 from numeric.cpp:55:
/usr/include/python2.7/pyconfig.h:1215:0: warning: "_XOPEN_SOURCE" redefined
 #define _XOPEN_SOURCE 600
 ^
In file included from /usr/include/stdlib.h:24:0,
                 from /usr/include/flint/fmpz.h:37,
                 from numeric.cpp:52:
/usr/include/features.h:166:0: note: this is the location of the previous definition
 # define _XOPEN_SOURCE 700
 ^
numeric.cpp: In member function ‘bool GiNaC::numeric::operator<=(const GiNaC::numeric&) const’:
numeric.cpp:1996:95: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope
                         return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_LE, "<=");
                                                                                               ^
numeric.cpp: In member function ‘bool GiNaC::numeric::operator>(const GiNaC::numeric&) const’:
numeric.cpp:2020:94: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope
                         return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_GT, ">");
                                                                                              ^
numeric.cpp: In member function ‘bool GiNaC::numeric::operator>=(const GiNaC::numeric&) const’:
numeric.cpp:2044:95: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope
                         return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_GE, ">=");
                                                                                               ^
make[2]: *** [Makefile:854: libpynac_la-numeric.lo] Error 1
make[2]: Leaving directory '/dev/shm/portage/sci-libs/pynac-0.7.7-r1/work/pynac-0.7.7/ginac'

@kiwifb
Copy link
Member

kiwifb commented May 17, 2017

comment:12

Yes it looks like you forgot those 3 instances of Pynac_PyObj_RichCmp when switching to PyObject_RichCompareBool.

@kiwifb
Copy link
Member

kiwifb commented May 17, 2017

comment:13

Somehow I missed part of the patch. Not sure how it happened but it is all there. Sorry for the noise.

@vbraun
Copy link
Member

vbraun commented May 21, 2017

Changed branch from u/rws/upgrade_to_pynac_0_7_7 to c1cff2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants