as of today, there is a new version of my ratpoints program available.
ratpoints-2.1 uses SSE instructions on x86 processors to work with 128 bits at
the same time (instead of 64 or even only 32). This results in a noticeable
speed-up (some 25% reduced running time for "make test", up to 40% for curves
with few points when searching up to a large height bound).
The program is available from the usual URL
http://www.mathe2.uni-bayreuth.de/stoll/progams/ .
Best wishes,
Michael Stoll
--
Michael Stoll * http://www.mathe2.uni-bayreuth.de/stoll/
Mathematisches Institut * Universität Bayreuth * 95440 Bayreuth, Germany
Michae...@uni-bayreuth.de
at one point, I ran into a similar compiler bug when compiling an earlier
version of the program with SSE2 enabled. It went away after I replaced a
complicated statement by several simpler ones.
> Since the code is currently GPL V3 there it does not
> qualify to be merged at the moment anyway.
What should I change to make it possible to merge it into SAGE?
Thanks,
Michael
Could you relicense it GPLv2+, i.e., "GPLV2 or at the users option any later
version of the GPL."
-- William
OK, I'll do that next week, when I'm back in Bayreuth.
Best,
It's now done. The current version also has a few bug fixes and is at the
usual place.
OK.
When writing ratpoints-2.0, I tried to make it easy to use it as a black box
by other programs (the old version was a stand-alone program, therefore had
to be adapted). So I don't expect problems, unless you use it for more than
searching for points. (I haven't looked at your code yet.)
Thanks!!
Some complaints.
1. The link at the beginning of this thread is broken:
http://www.mathe2.uni-bayreuth.de/stoll/progams/
2. Consequently, Robert Miller was deeply confused for days because of
this page:
http://www.faculty.jacobs-university.de/mstoll/programs/index.html
which has no link to your new page or warning.
3. Can you put everything in a directory? I just did
wstein@bsd:~/Desktop$ tar zxvf ratpoints-2.1.1.tar.gz
Makefile
ratpoints.h
rp-private.h
primes.h
gen_find_points_h.c
gen_init_sieve_h.c
sift.c
init.c
sturm.c
find_points.c
main.c
rptest.c
testdata.h
testbase
ratpoints-doc.pdf
gpl-2.0.txt
and it clobbered my Desktop.
Again, many thanks for GPL-v2+ your awesome program. We just tested
building it on OS X, PPC OS X, Opteron Linux, Solaris x86 and Solaris
Sparc. To get it to build on Opteron, OS X and Solaris x86 we had to
#undef __SSE2__, but then it built and seems to work fine.
-- William
william
Sorry for the typo (should be prog_r_ams, obviously). The "Programs" link from
http://www.mathe2.uni-bayreuth.de/stoll/
does work, however.
> 2. Consequently, Robert Miller was deeply confused for days because of
> this page:
>
> http://www.faculty.jacobs-university.de/mstoll/programs/index.html
>
> which has no link to your new page or warning.
I have no longer access to the Jacobs server. I guess I should tell them to
redirect everything to my new web address.
Robert could have asked me, though.
> 3. Can you put everything in a directory? I just did
>
> wstein@bsd:~/Desktop$ tar zxvf ratpoints-2.1.1.tar.gz
> Makefile
[...]
> gpl-2.0.txt
>
> and it clobbered my Desktop.
Done.
> Again, many thanks for GPL-v2+ your awesome program. We just tested
> building it on OS X, PPC OS X, Opteron Linux, Solaris x86 and Solaris
> Sparc. To get it to build on Opteron, OS X and Solaris x86 we had to
> #undef __SSE2__, but then it built and seems to work fine.
They probably use different notation for the SSE instructions. It shouldn't be
too hard to find out and adapt the definitions in rp-private.h (after #ifdef
USE_SSE) accordingly to make it work.
This is pretty close to the structure ratpoints is using now. The call to the
library function has the form
total = find_points(&args, process, (void *)info);
Here args is a structure containing the arguments that need to be passed
(coefficients of the polynomial, height bound, values for the various
parameters like number of primes to be used in the two sieving stages) and
process is a function like
typedef struct {...} data;
int process(long x, long z, const mpz_t y, void *info0, int *quit)
{ data *info = (data *)info0;
(...)
return(1);
}
When find_points finds a point, it calles "process" with the numerator and
denominator of the x-coordinate (as longs), the y-coordinate (as an gmp
integer), the pointer "info" that was passed to find_points, and a pointer to
an int. The return value is used to increment the eventual return value of
find_points ("total" in the example above). If "process" sets *quit to
something nonzero, find_points aborts the search (at least it hopefully does
so now, after fixing a bug found by Robert Miller). The "info" pointer can be
used to store information that should persist between calls to "process", for
example a basis of the free part of the subgroup generated by the points
found so far (Example 1 below). For Example 2 below, you just do "*quit = 1",
then the search stops after the first point is found and processed.
See the section on "How to use the library" in ratpoints-doc.pdf at
http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-doc.pdf .
> Example 1 (used in searching for points on elliptic curves): if you
> already know the rank, you can stop searching when the rank of the
> points found is equal to that.
>
> Example 2 (used in searching on quartics, i.e. homogeneous spaces in
> the 2-descent): stop after the first point found.
>
> I don't think there are more examples.
>
> So what I would do to your code is add this functionality. Or you
> could build it in, with some simpler point_processor options (which I
> already have) called point_printer (which just prints thepoints as
> they are found), point_counter (which keeps count of the points found,
> and can be asked at any point what the count is). etc.
I would think it is only necessary to set up a C++ wrapper that interfaces to
find_points. That should be pretty easy to do.