News:

alphaMELTS 1.9 is available at the download and information site.
alphaMELTS 2 standalone & for MATLAB/Python are available on request
(see the Version 2 tab on the download site for more details).
For news of all MELTS software see the MELTS Facebook page.

Main Menu

Calculation Stalling

Started by jschools, May 28, 2015, 12:47:03 PM

Previous topic - Next topic

jschools

I am trying to automate a batch crystallization sequence by running a script in MATLAB which alters the input files, calls MELTS, alters the input files, etc. I actually got this process to work, but I keep running into the problem of MELTS stalling in a calculation. If I work in the terminal I can force stop the calculation, but then I lose the automation. It would be great if it would just crash because then the script would take the output files and move on, but it gets hung up on dropping the clinopyroxene:

...Dropping phase clinopyroxene from the assemblage.

I'm looking for a way to avoid this stall, besides just canceling it in the terminal. I've attached the relevant files for an example of when this happens. Thank you for any help!

Joe

 

Paula

#1
Hi Joe,

The example you gave gets stuck in the subsolidus fO2 buffering routine. The easiest thing, at least in terms of automation, is to turn the fO2 buffer off after the first calculation. Then it fails, rather than hanging. You can also try ALPHAMELTS_LIQUID_FO2, which automatically turns off the buffer once liquid is exhausted. In either case the fO2 diverges from the buffer as the temperature drops; whether this is acceptable depends on what you are trying to model.

If you use ALPHAMELTS_LIQUID_FO2 then it runs quite a bit further before getting stuck in the ordering routines. First it gets stuck with orthopyroxene - that turns out to be a bug, as the copy of the orthopyroxene routines in alphaMELTS is missing a check on the maximum number of iterations to find the ordering state. That is fixed in alphaMELTS 2 (beta) as that uses Mark Ghiorso's latest code. I'll also fix it in alphaMELTS 1.5. Both new versions should be public in a few weeks time. If you remind me what operating system you are using I can send you a v1.5 beta in the meantime.

With the orthopyroxene check in place, the calculation runs but evenutally gets very slow round at about 450 oC. Calculation of the ordering state in pyroxenes and oxides becomes increasing difficult at low temperatures. The minimum temperature for which the MELTS model should be used is 500 oC (see the first FAQ on the MELTS site) so you should modify your PTpath files to reflect that.

So, you should be able to avoid most of the stalls by adjusting fO2 and temperature limits. You might be able to use 'try' and 'catch' in MATLAB to recover gracefully on occasions when you do need to cancel the program in the terminal. There isn't really a way, in MATLAB, to automatically kill it if it takes more than a certain number of seconds. I know that it can be done in Perl, but I don't know of an easy way (you need to have two processes - one running alphaMELTS and another timing the calculation).

Hope that helps,
Paula

jschools

Thank you! Using ALPHAMELTS_LIQUID_FO2 and setting a minimum temperature at 550C appeared to solve the issue. I had poked around in Perl for a couple days attempting to implement a timer, but it did not seem capable of stopping alphaMELTS besides completely killing it and stopping the output files.

I'm using OSX and I would love to see alphaMELTS 1.5.

Thanks again,
Joe