RE: Interrupt Service Routines in Mathematica v.5.2?
- To: mathgroup at smc.vnet.net
- Subject: [mg73925] RE: [mg73824] [mg73824] Interrupt Service Routines in Mathematica v.5.2?
- From: "Ingolf Dahl" <ingolf.dahl at telia.com>
- Date: Sat, 3 Mar 2007 01:04:47 -0500 (EST)
- References: <200703021111.GAA02756@smc.vnet.net>
- Reply-to: <ingolf.dahl at telia.com>
Hi Januk, My TaggedCells package (available from http://web.telia.com/~u31815170/Mathematica/ ) contains several ways to achieve similar effects. You might display a status cell, where you repeatedly write down the values of some control parameters, or display a status progress graph according to your own choice. Or you might repeatedly read and execute a control cell, which might change the program flow. The control cell might be manually edited, or changed by a FrontEnd button. Another possibility built into Mathematica is to use the "Interrupt Evaluation..." command in Mathematica to enter a subsession, or use the FrontEnd command FrontEndExecute[FrontEndToken["SubsessionEvaluateCells"]]. My experience, however, is that these commands are not really mature yet, and might cause system crashes. My private theory is that the Kernel-FrontEnd interaction is very "single-threaded" and easily get confused if the user and the Kernel try to communicate with the FrontEnd at the same time. That is not really what you want when you are running a long calculation. Best regards Ingolf Dahl -----Original Message----- From: Januk [mailto:ggroup at sarj.ca] Sent: 02 March 2007 12:11 To: mathgroup at smc.vnet.net Subject: [mg73925] [mg73824] [mg73824] Interrupt Service Routines in Mathematica v.5.2? Hi all, Is it possible to create an interrupt service routine in Mathematica v. 5.2? While running a long calculation, I want to define some other code that can be triggered by some event external to the calculation. On completion of the interrupt service routine, the main calculation should automatically resume with little or no knowledge that the interrupt ever occurred. The first place I would like to use this would be to monitor a long, complicated calculation in a loop. Each iteration through the loop may be too slow (or too fast) for me to simply display diagnostic information once per iteration. I would rather display the information every x-seconds, or when the user presses a button. Any suggestions or comments would be appreciated. Thanks, Januk
- References:
- Interrupt Service Routines in Mathematica v.5.2?
- From: "Januk" <ggroup@sarj.ca>
- Interrupt Service Routines in Mathematica v.5.2?