-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Update FLINT to 2.3 #12173
Comments
comment:1
Building flint2 in Sage:
|
Attachment: ulong_extras.patch.gz |
comment:2
Attachment: zmod.patch.gz zmod.patch replaces references to zmod_poly with nmod_poly and (hopefully) fixes places where the interface of a function changed. Completely untested at this point, of course. Some remarks: I deleted the zmod_poly_pow function implemented in Sage, since FLINT now provides such a function. There is no longer a _nmod_poly_set_coeff_ui, which was used in one place (creating a polynomial from a list). I replaced it with nmod_poly_set_coeff_ui rather than manipulating coefficients directly, which is a bit slower, but shouldn't matter that much. nmod_poly_resultant needs to be added in FLINT 2. If we don't get it done, the code calling it could just be commented out to fall back to the default Sage code that already handles the non-prime case. I didn't change any filenames or Sage types (so the corresponding Sage files/functions/types are all still called zmod_poly). The new pxd file uses the GMP mp_limb_t (etc) types rather than unsigned long (etc). Some search and replace might be needed, or importing the types from gmp.h. |
comment:3
Attachment: fmpz.patch.gz Added another patch for fmpz_poly functions. fmpz_poly.pxi still needs rewriting, and I didn't touch the cases in polynomial_rational_flint.pyx (since that file needs fmpq_poly fixes as well). |
comment:5
I just want to let you know that I have incorporated the current state of progress into an installation of Sage at
on sage.math.washington.edu. Step by step, I have gotten rid of some of the problems, but I didn't have enough time last week to finish this. By all means, please go ahead and continue working on this copy of the work. Best wishes Sebastian |
comment:6
That might be a stupid question, but how do I access your working copy? Should I ask for an account on the mentioned machine (to whom?)? |
comment:7
You should e-mail [email protected] and say you're working on getting FLINT into Sage. He'll give you an account on sage.math.washington.edu |
comment:9
Was the directory lost after the recent sage.math problems ? |
comment:10
Yes, it seems to be gone. |
comment:11
Any chance that one of you backed it up somewhere else ? |
comment:12
Sebastian says he doesn't have a backup. |
comment:13
This new spkg and patch should apply to a clean install of sage-5.0, and almost completely allows building Sage against flint-2.3: http://sage.math.washington.edu/home/fredrik/flint-2.3.spkg http://sage.math.washington.edu/home/fredrik/flint-2.3-sage-5.0.diff There is one small remaining issue building Sage: at one point, the definition of ulong in zn_poly.h apparently clashes with the one in flint. A quick workaround for development purposes is to add #ifndef ulong ... #endif in sage/local/include/zn_poly.h. I don't know the best proper fix. But with the workaround, sage -f flint-2.3.spkg sage -b should work. When starting Sage, there is a link time error (finding fmpz_set_ZZ), so it seems that the NTL interface is not being built or included correctly. Presumably, fixing that, Sage will start up successfully, though most likely there will be some bugs to hunt down... |
comment:14
I've had a very quick look and the spkg needs major simplification. I see that there was some restriction in the previous spkg-install reported by Michael Abshoff on an "US IIIi" with GCCC 4.3.2 which is not reflected in the configure script. To answer my own question, by default -funroll-loops is not included by default, which covers the solaris case. |
comment:15
I've just reuploaded fredrik patch as an attachment so that it can be easily viewed in trac. |
Attachment: flint-2.3-sage-5.0.patch.gz Fredrik's patch. |
comment:16
The NTL problem is just that interfaces/NTL-interface.lo is not included into libflint anymore. There was some partial magic added here (*_EXTRAS): Violently changing the Makefile.in to include NTL-interface.lo solves the problem, although this should certainly be included upstream rather than here. |
comment:17
Now sage launches but I get a crash when quitting due to an undefined symbol flint_stack_cleanup. |
comment:18
Another complication might be that the headers used to be installed into $SAGE_LOCAL/include/FLINT which is quite meaningful because there are a lot of them. It would be nice to use the install target, but it would put everything into $S_L/include/. Somebody has a thought about that? |
comment:19
The call to flint_stack_cleanup() should be replaced with a call to _fmpz_cleanup(), I think. I agree that it would be nice to keep the header files in a subdirectory. Dunno what the best solution is. |
comment:20
Replying to @fredrik-johansson:
My prefered solution would be that make install puts them in a separate directory by default. |
comment:21
Replying to @fredrik-johansson:
After quickly looking at the memory management in flint 1.* and flint 2.3, this seems the right solution to me (without real insight nonetheless) and indeed fixes the problem! |
comment:22
Now I get a LOT of segfaults.
|
comment:23
Two things :
With these changes I can create GF(4)! |
comment:24
The function n_factor is also called in descent_two_isogeny. |
comment:25
Running make ptest raises a limited number of problem. Apparently, something is now deallocated twice (I get a double linked blah from glibc, more precisely "*** glibc detected *** python: corrupted double-linked list: 0x00... ***"). This is not sytemcan be reproduced by testing ell_tate_curve.py for example. |
comment:26
Aa far as the other bugs are concerned, it seems that #6919 is back??? |
comment:330
Needs to pass "-fno-common" on darwin. http://gcc.gnu.org/ml/gcc/2005-06/msg00375.html and follow up is interesting on that subject. |
comment:331
OK, I am making and testing a new spkg. Please leave yours alone in order to avoid duplicate work. |
This comment has been minimized.
This comment has been minimized.
Diff flint-2.3 -> flint-2.3.p1 |
comment:333
Attachment: flint-2.3.p1.diff.gz |
This comment has been minimized.
This comment has been minimized.
Spkg diff, for review only. |
comment:334
Attachment: flint-2.3.diff.gz The new spkg with |
Upstream: Not yet reported upstream; Will do shortly. |
comment:336
FLINT's testsuite ( |
comment:337
Jeroen, could you please test te spkg on the PPC G5 with FLINT_TUNE="-fno-common -funroll-loops"? |
comment:338
Anyway, I'm ok with Jeroen changes to the spkg/patches, so I'm putting this back to positive_review. |
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. Developers acknowledge bug. |
This comment has been minimized.
This comment has been minimized.
comment:341
FYI, some patches similar to what Jeroen did have been integrated upstream and should be in the next release (and the other patch about dylib64 as well). |
Merged: sage-5.10.beta3 |
comment:343
It would probably be better to keep a symlink |
comment:344
The FLINT include directory issue ( |
Install:
Apply:
Apply to SAGE_ROOT:
Upstream bug with OS X PPC: https://groups.google.com/forum/?hl=en&fromgroups#!topic/flint-devel/KrgY0v09SwI
Dependencies: sage-5.9.beta5
Upstream: Reported upstream. Developers acknowledge bug.
CC: @jpflori @sagetrac-spancratz @williamstein @nexttime
Component: packages: standard
Keywords: flint spkg
Author: Mike Hansen, Fredrik Johansson, Jean-Pierre Flori
Reviewer: John Cremona, Jeroen Demeyer, Burcin Erocal
Merged: sage-5.10.beta3
Issue created by migration from https://trac.sagemath.org/ticket/12173
The text was updated successfully, but these errors were encountered: