Tagged Questions

Interrupting calculations, preventing interrupts and recovering data from aborts.

learn more… | top users | synonyms

5
votes
1answer
246 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
1answer
191 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
53 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
119 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 ...
3
votes
1answer
353 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
191 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
385 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
58 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
161 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
189 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 ...
12
votes
4answers
487 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 ...
9
votes
1answer
357 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 ...
33
votes
4answers
1k 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 ...