• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

config/H11-Feb-2021-26,31621,106

scripts/H03-May-2022-4,0583,525

src/H11-Feb-2021-10,6237,257

tests/H11-Feb-2021-926780

AUTHORSH A D03-Feb-2021251 126

COPYINGH A D24-Jun-202034.3 KiB675553

Makefile.amH A D05-Feb-2021739 212

Makefile.inH A D11-Feb-202126.5 KiB862746

NEWSH A D05-Feb-2021585 1713

READMEH A D05-Feb-20219.8 KiB236185

aclocal.m4H A D11-Feb-202143.2 KiB1,2041,095

config.h.inH A D11-Feb-20212.2 KiB8255

configureH A D11-Feb-2021627.6 KiB20,74417,439

configure.acH A D11-Feb-202111.5 KiB367346

README

1cmh: computation of genus 2 class polynomials.
2==============================================
3
4This software package computes Igusa (genus 2) class polynomials, which
5parameterize the CM points in the moduli space of 2-dimensional abelian
6varieties, i.e. Jacobians of hyperelliptic curves.
7
8This program is also able to compute theta constants at arbitrary
9precision (but the interface for this is still to be documented more
10clearly).
11
12This documentation consists of several chapters.
13 - [Introduction](#introduction)
14 - [License](#license)
15 - [Prerequisites](#prerequisites)
16 - [Compiling](#compiling)
17 - [Using](#using)
18 - [Output](#output)
19 - [Caveats](#caveats)
20 - [Internal documentation](#internal-documentation)
21 - [Advanced usage, including (but not limited to) MPI](#advanced-usage-including-but-not-limited-to-mpi)
22
23
24Introduction
25------------
26
27CMH computes Igusa class polynomials.
28
29The main authors are:
30
31 - [Andreas Enge](https://www.math.u-bordeaux.fr/~aenge/)
32 - [Emmanuel Thomé](https://members.loria.fr/EThome/)
33
34A code base by [Régis
35Dupont](http://www.lix.polytechnique.fr/Labo/Regis.Dupont/) is at the
36origin of this work.
37
38In March, 2014, we announced the computation of class polynomials for
39Shimura class number 20,016. See the separate [announcement
40text](announcement-record-computation-cm2.txt) for this computation.
41
42License
43-------
44
45```
46    cmh -- computation of genus 2 class polynomials and theta constants.
47    Copyright (C) 2006, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Régis Dupont, Andreas Enge, Emmanuel Thomé
48
49    This program is free software: you can redistribute it and/or modify
50    it under the terms of the GNU General Public License as published by
51    the Free Software Foundation, either version 3 of the License, or
52    (at your option) any later version.
53
54    This program is distributed in the hope that it will be useful,
55    but WITHOUT ANY WARRANTY; without even the implied warranty of
56    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57    GNU General Public License for more details.
58
59    You should have received a copy of the GNU General Public License
60    along with this program.  If not, see <http://www.gnu.org/licenses/>.
61```
62
63Prerequisites
64-------------
65
66The following software libraries are required to compile and use cmh;
67we usually recommend to use the latest version and not the absolutely
68minimally required one:
69 - [GNU MP](http://gmplib.org/) version 4.3.2 or above
70 - [GNU MPFR](http://mpfr.org/) version 2.4.2 or above
71 - [GNU MPC](http://mpc.multiprecision.org/) version 1.0.0 or above
72 - [MPFRCX](http://mpfrcx.multiprecision.org/) version 0.4.2 or above
73 - [PARI/GP](http://pari.math.u-bordeaux.fr/) version 2.9.0 or above
74
75The following libraries are optional
76 - [FPLLL](https://github.com/fplll/fplll) version 4.0.4 or above
77 - MPI implementation: any implementation can be used, e.g. openmpi,
78   mpich, mvapich2, ...
79
80A convenience script for fetching and building all the software
81prerequisites is in `./config/build-dependencies.sh` ; this builds all the
82needed packages in `$topdir/cmh-deps`, but can also be tuned to build
83elsewhere (see the script for more information).
84
85Compiling
86---------
87
88Distributed tarballs should ship with a `./configure` shell script.
89Development checkouts do not. For generating `./configure`, please run the
90`./config/autogen.sh` script, which requires the usual autotools
91dependencies (`autoconf`, `automake`, `libtool`)
92
93To compile and install, type:
94```
95./configure [[all relevant flags]]
96make
97make install
98```
99It might be very relevant to pass an appropriate `--prefix` option to the
100configure script, so that installation is done to a directory writable by
101the user.
102
103out-of-source build is supported.
104
105The recognized flags are
106```
107  --enable-mpi            use mpi to compile a parallel version [default=no]
108  --with-gmp=DIR          GMP installation directory
109  --with-mpfr=DIR         MPFR installation directory
110  --with-mpc=DIR          MPC installation directory
111  --with-mpfrcx=DIR       MPFRCX installation directory
112  --with-fplll=DIR        FPLLL installation directory
113  --with-pari=DIR         PARI installation directory
114```
115For MPI, see the section later in this document.
116
117Note that `make install` is *not* optional, since making the program run
118without doing `make install` first is difficult.
119
120Using
121-----
122
123The input to this program is a defining equation for a (for the moment,
124only dihedral) quartic CM field, in the form of two nonnegative integers
125$`A`$,$`B`$ for a corresponding defining equation $`X^4+A X^2+B`$.  The
126pair $`(A,B)`$ must be so that $`A^2-4B`$ is a positive integer which is
127not a perfect square, and $`(A,B)`$ minimal in the sense that no smaller
128pair defines the same field (the script complains if this is the case).
129The special case where the Galois group of $`X^4+A X^2+B`$ is $`Z/2
130\times Z/2`$ is also forbidden.
131
132The main entry point is the script placed in the following location by
133`make install`:
134```
135    $prefix/bin/cmh-classpol.sh
136```
137
138Its syntax is:
139```
140    $prefix/bin/cmh-classpol.sh -p -f A B
141```
142
143where $`A`$ and $`B`$ are the integers defining the CM field as discussed
144above.  This, in effects, does the two out of three possible steps.
145 - The `-p` option does the "preparation", which consists in computing a
146   list of period matrices corresponding to one orbit under complex
147   multiplication. This list ends up in the `.in` file (see next section
148   for location and naming).
149 - The `-f` option does the big part of the computation, which is the
150   computation of class polynomials from the config files. This is
151   programmed in C (here and there, when we refer to "the C code", this
152   designates the code which gets run for this step). An optional feature
153   is provided for doing this step in parallel over several processors or
154   nodes. The output ends up in the `.pol` file (again see below).
155
156Additionally, adding the `-c` flag does a third step, which checks the
157computed class polynomial for correctness as follows (see also
158[`BUGS`](BUGS)).
159 - find a Weil number $`p`$
160 - find a triple of Igusa invariants corresponding to roots of the class
161   polynomials mod $`p`$
162 - use Mestre's algorithm to reconstruct a hyperelliptic curve from its
163   invariants
164 - check that the Jacobian of the curve above has cardinal `$\operatorname{Norm}(1\pm pi)$`.
165
166Some other flags are mostly for interal use. Noteworthy ones are `-N`,
167which disables the temporary checkpoint data creation, and `-b xxxx`, which
168modifies the starting precision.
169
170Output
171------
172
173All output of the program goes to the `data/` directory (which may be a
174symbolic link to auxiliary storage).
175
176All files are created with a common prefix `D_A_B`, where $`D`$,$`A`$,$`B`$ are three
177integers. $`A`$ and $`B`$ are the integers discussed above, while $`D`$ is the
178discriminant of the real quadratic subfield (this is the fundamental
179discriminant of $`\mathbb{Q}(\sqrt{A^2-4B})`$.
180
181| file name         | description |
182| ----------------- | ----------------------------------------------------------
183| `D_A_B.in`        | description of the set of period matrices describing the different irreducible factors of the class polynomials.  The format of this file is used internally, but its details are discussed in the "internal details" section. |
184| `D_A_B.pol`       | the different irreducible factors of the class polynomials (more precisely of the CM variety in the moduli space). This is given in triangular form `(H1,H2hat,H3hat)`, and discussed in the "internal details" section. These polynomials are defined over the real quadratic subfield of the reflex field. |
185| `D_A_B.gp.log`    | output (terse) of the pari/gp program which computes the `.in` file from (A,B) |
186| `D_A_B.out`       | output of the C code for computing `.pol` from `.in` |
187| `D_A_B.check.log` | output of the pari/gp program which computes a hyperelliptic curve whose Jacobian has CM by the desired field, and checks its cardinality for consistency with the expected value.  [ only if `-c` was provided on the command line of cmh-classpol.sh ] |
188| `D_A_B/`          | temporary checkpointing and restart data. The precise meaning and format of these files is not documented, and subject to incompatible change without notice. |
189
190Caveats
191-------
192
193See [`BUGS`](BUGS)
194
195Internal documentation
196----------------------
197
198The `.in` and `.pol` file formats are discussed in
199[`README.format`](README.format)
200
201Advanced usage, including (but not limited to) MPI
202--------------------------------------------------
203
204The main C binary which is used to compute class polynomials (the `.pol`
205file) from orbits of period matrices (the `.in` file) has an MPI version.
206This version can be compiled by passing `--enable-mpi` to configure.
207
208The non-parallel binary is called `cm2`, and the binary is created in the
209`$builddir/src`. `make install` installs `cm2` in `$prefix/bin/cm2`
210
211The parallel binary is called `cm2-mpi`, and the binary is created in the
212`$builddir/src`. Obviously, `cm2-mpi` is created only if `--enable-mpi` is
213passed to configure. `make install` installs `cm2-mpi` in
214`$prefix/bin/cm2-mpi`
215
216If you intend to use MPI for computing the class polynomials, this very
217likely means that you are well beyond the intended scope for the
218`cmh-classpol.sh` script. For this reason, `cmh-classpol.sh` has no provision
219for calling `cm2-mpi` directly, and this binary must be called manually.
220
221We assume that you have successfully created a `.in` file (using
222`cmh-classpol.sh -p`). Then, the syntax for `cm2`, or `cm2-mpi`, is:
223```
224    cm2 -i D_A_B.in -o D_A_B.pol [other flags]
225
226    mpirun -n #jobs [other mpi options] cm2-mpi -i D_A_B.in -o D_A_B.pol [other flags]
227```
228
229
230This will eventually write the result in `D_A_B.pol` ; the code has
231provision for resuming interrupted computations, as intermediate
232computation checkpoints are saved in a subdirectory called `D_A_B/` ;
233checkpoints are enabled by default, but they may be disabled using the
234`--no-checkpoints` command-line option.
235
236