Revision 132f63c1a343af4280df47cf9cc0453060d506b7 authored by Jérémie Detrey on 10 March 2014, 10:29:14 UTC, committed by Jérémie Detrey on 10 March 2014, 10:31:12 UTC
1 parent b2cdbc1
Raw File
README.msieve
Instructions on how to use CADO-NFS with msieve
===============================================

Summary:

I) Using CADO-NFS with relations computed with msieve (or ggnfs)
II) Using msieve filtering and linear algebra with relations in CADO format
III) Using msieve linear algebra after CADO-NFS filtering

==============================================================================

I) Using CADO-NFS with relations computed with msieve (or ggnfs)

The format of relations used by CADO-NFS is the same as the one used by ggnfs
or msieve.

1) First, convert the polynomial from Msieve format to CADO format using:
   $ build/<hostname>/misc/convert_poly -if msieve < input.poly > output.poly

2) Since ggnfs doesn't print prime factors under 10000, and CADO-NFS requires
   all prime factors, you will need to complete all relations files that are in
   ggnfs or msieve format using:

   $ build/<hostname>/misc/check_rels -complete rels.out.gz -poly <polyfile> file0 file1 ... filen 
        or
   $ build/<hostname>/misc/check_rels -complete rels.out.gz -poly <polyfile> -filelsit <filelist>
        where <filelist> is a name of a file containing the list of all
        relations files

    See check_rels -h for others options.

3) Create a parameterfile for the Python script: see, in the scripts/cadofactor
directory, the files 'parameters' and 'README'. In the README file, read
thoroughly the section on importing polynomial file and importing relations.

4) run the cadofactor.py script (where $CADO is the CADO-NFS directory):

   $ $CADO/scripts/cadofactor.py <parameterfile>

If the parameter file is correctly configure, the script will skip the
polyselect step and the sieving. It will run all the remaining step of the
factorization until the factors are found. 

NB: If you want to do only the filtering step, you should remove the file
'linalg/bwc/bwc.pl' in your __build directory__, this will make the script crash
at the beginning of the linear algebra (a more elegant solution should be
available soon).

==============================================================================

II) Using msieve filtering and linear algebra with relations in CADO format

1) Create a file msieve.fb, which contains:

      N <number to be factored>
      R0  <coeff of x^0, rational side>
      R1  <coeff of x^1, rational side>
      A0  <coeff of x^0, algebraic side>
      A1  <etc>
      A2  <etc>
      A3  <etc>
      A4  <etc>
      A5  <etc>

   This can be done with:

      $ ./convert_poly -of msieve < cxxx.poly > msieve.fb

2) create a file msieve.dat, which contains:

      N <number to be factored>
      <all the relations in GGNFS/CADO format>

   (Do not include free relations, since the CADO-NFS format is not
    recognized by msieve, and msieve includes them in the filtering.)

3) then run "msieve -nc -v <number to be factored>"
   The msieve output goes into msieve.log.
   You can add the "-t 4" option to use 4 threads.   

==============================================================================

III) Using msieve linear algebra after CADO-NFS filtering

up from SVN 891, msieve can read a cycle file produced by CADO-NFS. To use it,
you will have to:

- use CADO-NFS for the filtering. In what follows, let 'prefix' be
  the prefix used for all the CADO filenames
- use the CADO 'replay' binary with --for_msieve to produce
  a file <prefix>.cyc
- concatenate all the relation files specified by purge.log in
  the order specified, and name the file <prefix> in the same
  directory as all the other CADO intermediate files. If Msieve was
  compiled with zlib support, the files do not have to be uncompressed
- create a <prefix>.fb file with the polynomials in Msieve format
- create worktodo.ini with a single line containing N
- run Msieve LA with

  -v -nf <prefix>.fb -s <prefix> -nc2 "cado_filter=1"

The string at the end may get extra options depending on whether
the LA has more tweaking, like using MPI. The .cyc file gets
overwritten during the LA, so re-running the LA does not require
cado_filter=1.



back to top