Feature #718
Insert calls to CheckForInterrupt
Description
So that interrupts are acted upon we must insert calls to CheckForInterrupt
in various places -- principally in loops which may take a long time, I believe.
Related issues
History
#1 Updated by John Abbott almost 9 years ago
I suggest we keep a log here of the files we have looked at with a view to inserting calls to CheckForInterrupt
.
#2 Updated by Anna Maria Bigatti almost 9 years ago
- Status changed from New to In Progress
- Assignee set to Anna Maria Bigatti
- % Done changed from 0 to 10
Nice! I added it into TmpGReductor.C
(I was actually doing something else with very slow GB ;-) )
void GReductor::myReduceCurrentSPoly() { try { CheckForInterrupt(); } // C-c for long computations catch (const InterruptReceived&) { CoCoA_ERROR("InterruptReceived", "GReductor::myReduceCurrentSPoly"); } .....
I'm not quite sure it is what intended, but it works.
#3 Updated by John Abbott almost 9 years ago
Mario asked about the possible run-time cost of calling CheckForInterrupt
.
InterruptFlag()
defined in GlobalManager.H
does several checks:
- check that
GlobalManager
has been created - check that a flag has been specified (i.e. if a pointer is non-NULL)
- get the value of the pointed to flag.
It may be simpler to define a global flag belonging to CoCoALib (but which is simply left as "false"). I think we could also skip checking whether GlobalManager
has been created -- in the worst case you'll get a SEGV when calling CheckForInterrupt
-- but I'd be amazed if that was the first time GlobalManager
was needed. Perhaps I'll do a quick overhead check for the current implementation.
#4 Updated by John Abbott about 8 years ago
- Target version changed from CoCoALib-0.99540 Feb 2016 to CoCoALib-1.0
#5 Updated by John Abbott about 8 years ago
- Related to Feature #744: Handle interrupts more helpfully added
#6 Updated by John Abbott over 7 years ago
I tried interrupting a long gbasis computation (as part of one of Mario's long radical examples). The computation had been running for about 50 hours (probably not all the time in that gbasis computation), but the interrupt took over 15 minutes to be recognized. That is a bit slow!
It is quite possible that CoCoALib was doing a reduction of a "hideously large" polynomial; I'm not sure whether it is really worth trying to interrupt inside a reduction... :-/
#7 Updated by Anna Maria Bigatti almost 7 years ago
- Related to Support #1023: CoCoAManual for verbosity: how to find which levels? how to find which functions? added
#8 Updated by John Abbott almost 4 years ago
- Related to Feature #1457: Make SmoothFactor interruptible added
#9 Updated by John Abbott over 2 years ago
- Target version changed from CoCoALib-1.0 to CoCoALib-0.99850
- % Done changed from 10 to 60
#10 Updated by John Abbott over 2 years ago
- Related to Feature #1633: Make polynomial multiplication interruptible? added
#11 Updated by John Abbott over 1 year ago
Nico Mexis asked whether there could be a check for interrupts inside the factorizer.
This will much easier to achieve when the factorizer is modernized... if ever (sigh).
#12 Updated by John Abbott over 1 year ago
- Related to Feature #127: Convert DUPFF code to C++ added
#13 Updated by John Abbott about 1 year ago
- Status changed from In Progress to Resolved
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880
- % Done changed from 60 to 90
I do this whenever I encounter a case which is not yet covered.
I think most cases are now covered. Hence 90%. But postponing as well.
#14 Updated by John Abbott 5 months ago
Make matrix inverse
interruptible (at least for matrices over ZZ
).
Example: inverse(RandomUnimodularMat(ZZ,500))
#15 Updated by John Abbott 5 months ago
I have made inverse
interruptible (DetByGauss
). I suppose we should also make a DetByCRT
at some point?