Interrupting calculations, preventing interrupts and recovering data from aborts.

learn more… | top users | synonyms

3
votes
0answers
50 views

Why does the debugger not stop when a message is generated?

I am on version 10.1. I have enabled the debugger and I have checked the box in front of "Break at Messages" in the Debugger Tools Window. However most the time the debugger does not stop when a ...
5
votes
1answer
257 views

Can I automatically stop operation that is too slow?

I need to write code like this: Do operation 1, but if it takes more that 5 seconds then stop it and do operation 2. Is it possible to do this somehow without manual interruption?
5
votes
3answers
1k views

How do I interrupt (abort) a computation in Mathematica?

Sometimes I (inadvertently or naively) write a code that would take Mathematica a long time to compute on my laptop or any computer for that matter. For example: Table[Length[Select[Permutations[n], ...
6
votes
1answer
362 views

Resume/continue interrupted evaluation

I interrupted an evaluation to quickly do something else. How do I resume the interrupted evaluation? I cannot open the "Interrupt evaluation" window, as it is disabled. There is no "Resume" button to ...
0
votes
0answers
55 views

Interrupting FactorInteger automatically when it takes a very long time [duplicate]

Sometimes when I use FactorInteger[] with certain very big integers, it takes a very long time, and I have to interrupt the operation manually to try another ...
3
votes
1answer
143 views

How to catch an interrupt (Control-C) in a script?

If a user hits Control-C when a script is running, they get an Interrupt> prompt, where they have to type exit or ...
4
votes
1answer
769 views

How can I save the current evaluation state of a notebook and start from it later?

I currently have a nested Table command running (in Mathematica 9), with two progress bars to track the variables. I have to shut down or hibernate the computer in ...
10
votes
1answer
231 views

TimeConstrained dynamic change of maximum time

I would like to run a time consuming function: TimeConstrained[f[x],maxseconds] and be able to change maxseconds during running (increasing or decreasing max ...
4
votes
3answers
596 views

Stop Computation - Is Exit[] overkill?

The following example either finds a factor of the number $n$ or returns a message saying that the number in question is prime (I specifially wrote this to demonstrate my question below). ...
5
votes
0answers
61 views

At what point should MLSetMessageHandler() be called?

I have an Installable MathLink program written in C. I would like to use a custom message handler. At which point in the C source code should I call ...
5
votes
1answer
189 views

Is it possible to save an interrupted computation?

I've got this really time consuming factoring problem. To decouple things a bit, I decided to start Mathematica using the command line interface (under screen). ...
7
votes
1answer
200 views

How can I have interruptible computations inside a manipulate?

Here's a perfect example of my problem: Manipulate[Pause[n], {n, {1, 10}, ContinuousAction -> False}, SynchronousUpdating -> False] It is illustrated by ...
15
votes
4answers
661 views

Recovering intermediate results from a Table after an interruption

I am interested in knowing if it is possible to recover intermediate results from a Table after an interruption. Let us say I want to produce a really useful table ...
10
votes
1answer
432 views

Abort not aborting

I have a relatively simple bit of code that looks like the following: ---some code here--- If[statement, Abort[]]; ---more code following--- However, while ...
40
votes
5answers
2k views

How to abort on any message generated?

Mathematica is a bit unusual as a programming language because it never stops on messages, regardless of whether the message is an error, a warning or just an informative message. It simply prints the ...