Tag Info

Hot answers tagged

9

First regarding Dynamic and related functions: If I understand right, the Mathematica kernels has two evaluation "channels", one used by main evaluations submitted by SHIFT-ENTER, and one for Dynamic things (called preemptive evaluations). Preemptive evaluations can interrupt main evaluations, but we still have only two "channels", and an already running ...


8

You hit a rather subtle behavior, related to the garbage-collection and the Temporary attribute, and the semantics of Module regarding returning expressions. The thing is, to achieve your goal, you need the Module-generated variable (function)'s definition(s) to be exported outside Module (to be persistent). But, since you return not the symbol itself, but ...


6

Why this does not work The problem here seems to be that Catch can only catch exceptions thrown by some code down the same evaluation stack, corresponding to the same evaluation process. However, the asynchronous mechanism you use (based on CreateScheduledTask etc) induced a different evaluation at a specified time, with another evaluation stack, and at a ...


5

By using the ideas of @Szabolcs, I've managed to write a convenient function which almost does what you want (edit: there is a better version of this function in the third edit, that does exactly what you want): ClearAll[AsynchronousEvaluate]; SetAttributes[AsynchronousEvaluate, HoldAll]; AsynchronousEvaluate[exp_] := DynamicModule[{eval, display}, ...


5

Computing Processes are the number of main kernels you can use at the same time. Therefore, you can have on the same computer two Mathematica sessions running and while one computation is running, you can use the other one to do something else. It has nothing to do with your license which is valid for only one computer. The probably easiest method if you ...


4

If it is not important that you share variables during the calculation, maybe one solution would be to start a separate kernel to calculate (using LinkLaunch) and have the asynchronous calculation run there. One disadvantage of this method is of course that it uses up another kernel license.


3

The 2 CONTROLLING processes effectively means you can run 2 front-ends at the same time. This might be, say, Mathematica 8 and Mathematica 9 on the same machine at the same time, or one copy of Mma 9 on your desktop and another on your laptop (if your License allows same: check with Wolfram). The COMPUTING processes (8) are the number of slaves / cores you ...


2

Eh, the answer lay a click deeper in the documentation. You need to set Method->"Queued" on Button, then you don't even need to disable SynchronousUpdating. This now works as expected. x = 0; Dynamic[Button[x, Pause[6]; x++, Method -> "Queued"]]


1

ParallelSubmit does not automatically distribute the definition from the main kernel to the parallel kernel. So what's happening is that the parallel kernels don't know any definitions for runFijiMacro and return these unevaluated. Only when the main kernel calls WaitAll it will get the yet unevaluated expressions runFijiMacro["command line code"] and ...


1

I think there are two things that go wrong: first by restarting $ScheduledTask you are also reusing the delay of one second that you gave with RunScheduledTask. Second your Pause might start before the Dynamic fires (or is finished). This seems to work as expected (I am using a slightly more complicated Dynamic which lets me better see what happen as I don't ...



Only top voted, non community-wiki answers of a minimum length are eligible