From 224cbae05e80f3d5798a2b2685a5978d6b6b2c52 Mon Sep 17 00:00:00 2001
From: Pierrick Gaudry
Date: Fri, 30 May 2014 16:52:44 +0200
Subject: [PATCH] Some documentation about the descent

README.dlp  5 ++
files.dist  1 +
sieve/README.descent  89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 92 insertions(+), 3 deletions()
create mode 100644 sieve/README.descent
diff git a/README.dlp b/README.dlp
index 8322cb9..6f3af4f 100644
 a/README.dlp
+++ b/README.dlp
@@ 28,6 +28,5 @@ output of the linear algebra and the data remembered during the filtering
phase. The result is in the $wordir/$name.reconstruclog.dlog file.
Individual logarithms, using a descent stage, must be computed by hand
with the help of the sieve/las binary. For that it needs to be recompiled
with DLP_DESCENT and SUPPORT_LARGE_Q (see lasconfig.h).

+with the help of the sieve/las binary. See sieve/README.descent for some
+guidelines.
diff git a/files.dist b/files.dist
index ba9094c..34be775 100644
 a/files.dist
+++ b/files.dist
@@ 604,6 +604,7 @@ scripts/cadofactor/CMakeLists.txt
sieve/CMakeLists.txt
sieve/Makefile
sieve/README.fb_format
+sieve/README.descent
sieve/basicnt.h
sieve/bucket.c
sieve/bucket.h
diff git a/sieve/README.descent b/sieve/README.descent
new file mode 100644
index 0000000..e372e78
 /dev/null
+++ b/sieve/README.descent
@@ 0,0 +1,89 @@
+Using las for the descent
+=========================
+
+The 'las' binary can be used not only for generating relations in the
+factorization or dlp context, but also to "descend" elements in order to
+compute the logarithms of elements that are not in the factor base.
+We assume here that the reader is familiar with the literature on the
+subject.
+
+Initialization of the descent
+
+
+No tool is provided yet for this stage, which relies heavily on ECM.
+We assume that it has been done by a separate program, and that we endup
+with a bunch of nottoolarge integers whose logs are required in order
+to deduce the log of the target element.
+
+WARNING: We assume that these nottoolarge integers are a few bits below
+64 bits. Even for recordscale computations, this should not be a problem
+to initialize the descent up to 55 bits smooth elements.
+
+Recompiling las
+
+
+The las binary must be recompiled to run in "descent" mode:
+In lasconfig.h, uncomment the following parameters:
+ #define DLP_DESCENT
+ #define SUPPORT_LARGE_Q
+Furthermore, in local.sh, uncomment the line:
+ FLAGS_SIZE="D__SIZEOF_P_R_VALUES__=8"
+
+Then recompile cadonfs, maybe in a separate builddirectory. If you are
+on a 32bit machine, then this might actually fail at compile or
+execution time. It is highly recommended to choose a 64bit platform.
+
+Writing a Hint File
+
+
+The descent requires a "hint file" that contains information about how to
+tune the parameters along the descent.
+
+Each line correspond to a bitsize of a specialq for one side. For
+example:
+ 55r 0.028 1.00 I=15 400000,47,65,1.4 400000,48,94,2.0
+means (in order):
+ 55r : this line is about a 55bit specialq on the rational side
+ 28.2 : expected time in seconds to find a relation
+ 1.00 : probability of success
+ I=15 : the I to use
+ 400000,47,65,1.4 : parameters for the rational side lim,lpb,mfb,lambda
+ 400000,48,94,2.0 : same for the other side.
+
+At the moment, it *mandatory* to have the same values for I, lim0, lim1
+on each line. This might change if we see a clear need to make them vary.
+
+There must be one line for each size that can occur during the descent,
+and the parameters must be so that there is a high chance to get at least
+one relation.
+
+An example hintfile will be given as example in the future.
+
+Preparing the Todo file
+
+
+Each prime integer q for which the log is wanted must be converted into a
+rational ideal. This amounts to computing the root of the linear
+polynomial in the *.poly file modulo q. All of those must be put in a
+"todo file", each on one line, with the format
+ r
+where "r" stands for "rational".
+
+Running las with appropriate arguments
+
+
+The command line for las must be something like (assuming the prefix name
+for files is p120):
+
+/buildpath/sieve/las poly p120.poly fb p120.roots.gz I 15 \
+ rlim 4000000 alim 4000000 lpbr 25 lpba 26 mfbr 100 mfba 100 \
+ todo p120.todo allowlargesq descenthint p120.hints
+
+Note that:
+ using mt is not recommended in this context (untested).
+ I, lim0, lim1 must be the same as the one in the hint file.
+ lpb0, lpb1 give the limit where to stop the descent.
+ mfb0, mfb1 are not used, but mandatory (!)
+
+If during the execution, it prints a failure message, then you should
+probably increase the corresponding parameters in the hint file.

2.1.4