Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.3K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Abort calculation and get unfinished result

Posted 6 years ago

Hello everyone, I am using Mathematica quite often to do calculations over nested tables with many iterators/parameters such as, generally speaking,

Table[f[a,b,c,d,e],{a,a_min,a_max},{b,b_min,b_max},{c,c_min,c_max},{d,d_min,d_max},{e,e_min,e_max}]

In this particular case, I have to do this since I couldn't find a way to make the built-in fit functions work for a very restricted parameter space, so I had to design a brute-force least-square fit myself, but that's another story.

I was now wondering, since such evaluations can naturally take very long, if there is any way of aborting a function in Mathematica but still getting the (unfinished) result. In case of a table, it should be pretty obvious what such a result could be: just a table with the first values of f[a,b,c,d,e] where i.e. only the parameter a has taken all values a_min to a_max and the other parameters are only evaluated for values close to their minimal values, i.e. the final table has a lot of empty entries.

I'd be grateful for any ideas.

3 Replies
Posted 6 years ago

Hi Sebastian,

You could try ParallelTable if you are able to run multiple kernels. For an interruptible solution take a look at this MSE post.

POSTED BY: Rohit Namjoshi

Please add cross-post links to this and the corresponding MSE post.

POSTED BY: Daniel Lichtblau
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard