Jump to content
Geochemist's Workbench Support Forum

Automatically kill or limit GWB run when calculation runs too long


Sven
 Share

Recommended Posts

I am currently using GWB 9 (React) for uncertainty analyses meaning that I start some hundred or thousand runs with a single script. Sometimes one or another run within this number is proceeding endlessly. In my specific case the maximum number of iterations was exceeded so that the step size was reduced. Since this happened several times the step size became so small that no significant reaction progress took place any more. I have fixed this problem by increasing itmax to 1000. But in another case even that didn't help.

 

Is there any possibility to automatically kill a run when for example a maximum number of steps or the absolute time used for a single run is exceeded?

 

I know that I can manually kill a run from the GWB menu, but if you are running 10000 calculations or so in a queue, it would be more economic to have the code doing that for you.

Link to comment
Share on other sites

Hi Sven,

 

As you're aware, you can limit the number of iterations or swaps in a single step from the Config - Iterations dialog, but at the moment there is nothing within React to limit the number of steps. Depending on what you're using to control all of your React scripts, however, there might be something in the parent program to limit the number of steps React takes. Could you explain a little more how you're doing this?

 

By the way, I've submitted a request for the development team to implement something like this for GWB11.

 

Regards,

 

Brian Farrell

Aqueous Solutions LLC

Link to comment
Share on other sites

Hi Brian

 

Thank you for your reply and for passing the request. My controlling program works as follows: It generates a single React script for a number or consecutive runs and then executes React.exe via a WinAPE ShellExecute procedure with the script as a parameter. Once started I have no control over the execution of the script. Only when React has completely executed the script control is given back to my controlling program.

 

A workaround would be to kill React.exe if the total execution time seems to be too long, check which runs have been done and pass a reduced script to a newly called React.

Another principal possibility would be of course to use the plug-in feature to have direct control over React. But I would have to write a Delphi wrapper for GWBs C++ DLLs, which I try to avoid.

 

Best regards

 

Sven

Link to comment
Share on other sites

Hi Sven,

 

I spoke with one of the programmers about this. Just to clarify, is the controlling program written in Delphi? If so, is there not an asynchronous way to call ShellExecute? He thought you could terminate the program after a certain amount of time if it hasn't finished the process. Also, do you mean WinAPI?

 

Thanks,

Brian

Link to comment
Share on other sites

  • 2 weeks later...

Hi Brian,

you are correct. It is possible to kill the process started by ShellExecute (WinAPI of course although I sometime feel like an Win-Ape when working with WinAPI) after a certain time. But with a script that contains several hundred or so runs, killing the process (that fails to complete run #257 for example) would mean not to execute the remaining runs (258, 259, ...) in the script.

An alternative would be to execute React for every single run (with an individual script for each run). But that approach would be considerably slower since React would have to be reloaded every time.

A way to handle the problem would be to write code that

- continuously checks which runs have been completed

- kill React if one run takes too long

- remove from the script all parts that have already bee processed and

- restart React with the shortened script

Link to comment
Share on other sites

  • 1 year later...

Hi Sven,

 

I hope you’re doing well. A while back you inquired about the possibility of automatically killing React runs that take too long. I wanted to let you know that we’ve developed this feature for GWB Release 11. Now you can set a pre-determined cutoff in terms of reaction steps or computational time. Please let us know if you’d like to try out our latest release or if you’d like a quote. Upgrades are available at a special price until February 28th. I hope to hear from you soon.

 

Cheers,

 

Brian Farrell

Aqueous Solutions

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...