From 2547365ceb79d90b98544f00832b01f849ec009b Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas.enge@inria.fr>
Date: Fri, 24 Feb 2023 13:16:39 +0100
Subject: [PATCH] Document checkpointing.

* doc/cm.texi: Add a paragraph.
* NEWS: Add an entry.
---
 NEWS        | 6 ++++++
 doc/cm.texi | 9 +++++++++
 2 files changed, 15 insertions(+)

diff --git a/NEWS b/NEWS
index 1fd99ad..893e5e7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+Changes in version x.y.z:
+  - If the environment variable CM_ECPP_TMPDIR is set, write checkpoint
+    files during the second phase of ECPP while factoring class
+    polynomials. This makes it possible to interrupt and restart the
+    computation.
+
 Changes in version 0.4.1 ("Fitzebohnen"), released in January 2023:
   - By choosing ECPP parameters differently, difficult prime numbers should
     be handled more gracefully. At least a reported difficult step now works
diff --git a/doc/cm.texi b/doc/cm.texi
index ceab437..e25665e 100644
--- a/doc/cm.texi
+++ b/doc/cm.texi
@@ -906,6 +906,15 @@ processes for the parallel version, in which data that is common over
 several invocations can be stored. The data is then computed on the first
 run and read from disk during subsequent runs. If the environment variable
 is not set, the data is recomputed every time.
+This concerns files named @code{cm_h.dat} for class numbers and
+@code{cm_prim_xxxx.dat} for primorials.
+
+Setting this variable also causes checkpoint files named
+@code{cm_factor_xxxxxxxxxxxxxxxx.dat} to be written to this directory;
+they are useful when certifying very large numbers, for which the
+program execution may be interrupted during the second ECPP phase.
+They depend on the number to be certified and can be deleted after
+the certificate creation.
 
 It is possible to run only the first, downrun phase or only the second,
 CM phase of ECPP using the command line options @code{-1} or @code{-2},
-- 
GitLab