Paralyzer

Paralyzer is a simple tool to aid with phase equilibria calculation in Perple_X. Specifically, Paralyzer is designed to take a calculation that would normally be run in vertex and split it into a number of segments that are then calculated independently of each other (either sequentially or in parallel on a multiple processor computer). A major advantage of this approach is that the compositional range of each phase within a calculation segment is typically far less than across the entire diagram, so the calculation becomes dramatically simpler (more information on Perple_X's 'pseudocompound approximation' and current optimization strategies can be found in Connolly, 2009, G-cubed). This allows either (i) substantially faster calculation for any given problem, or (ii) better possible compositional resolution without causing vertex to fail.


Paralyzer is distributed as a series of Matlab scripts that are linked to make operation as user-friendly as possible. Fuller instructions are bundled with the download, but effectively all that is required is for the scripts to be placed in the same folder as vertex and the 'problem files' (e.g. the dataset, solution model and perplex_options files). Simply then navigate to this folder in Matlab and run 'Paralyzer' – a pop-up window will give a few simple options (see image to right). Paralyzer will then automatically split the problem into multiple segments, control the sequential/simulataneous calculation of phase equilibria in each segment, and finally combine the results of each segment into a series of 'master files'. These can then be interpreted as if they were standard Perple_X outputs (i.e to generate a single phase diagram or contour maps of mineral/rock properties). Perple_X's 'werami' and 'pssect' programs shouldn't even realize that the calculation was run in multiple parallel segments.


We're working on a paper that more fully describes some of the benefits of this parallelization approach, and will include both benchmarks of specific phase equilibria problems and details of particularly efficient parameter sets. In the meantime, a moderately well documented version of the code can be obtained here (downloads a zip file with the Paralyzer scripts and instructions).

Paralyzer input window. All inputs and options are controlled from this screen.

Paralyzer version and debug history (with luck this will never become a very long list):

Paralyzer is a fairly simple piece of code so there shouldn't be too many bugs (hopefully). It does, however, involve a lot of reading and writing of files (and navigating around the operating system) so there is room for things to go wrong. If you have a problem, I'll try to fix it as quickly as I can. To do that I'll need to know your operating system and the specific problem that Matlab reports (just copy and paste the output text). I may also find it useful to see the input files that provoked the problem. No promises, but I'll certainly try to fix it! Please also remember that Paralyzer relies upon vertex – if the input files cannot be read by vertex (or if when run in vertex without Paralyzer they produce any error other than 'too many pseudocompounds'), then Paralyzer won't work either. So if you find a problem with Paralyzer, it is worth checking what would happen if you ran the same calculations without Paralyzer before reporting that problem!

Jan. 4, 2016:

This version (i) resolves a failure involving not being able to find the correct Perple_X option file (a problem that has appeared with some of the newer Perple_X releases), and (ii) should run complex calculations quite a bit faster by getting Matlab to utilize less CPU time while vertex is running (Matlab was previously constantly scanning for finished segments but now only checks every 2 seconds, which actually liberates quite a lot of CPU time).

Aug. 8, 2014:

2nd update today... Since its original coding, Paralyzer has had a couple of very inelegant sections related to checking how many pseudocompounds are required for each calculation. I thought that they just added a small time-penalty, but today discovered a couple of cases and operating systems for which they were at best hopelessly inefficient or at worst caused Paralyzer to quit mid-task. v1.5 (which also incorporates Boris' modifications, see below) resolves this and should substantially improve stability on some platforms, moderately improve speed on others, and (hopefully) do nothing detrimental on the rest. Although this adds no new functionality, I suspect that it might fix a few nagging problems that were difficult to pin down.

Aug. 8, 2014:

Boris Kaus (University of Mainz) identified a problem with the way that Paralyzer makes system calls on Macs running OS-X v10.9 and on Linux machines, and suggested a solution. He also restructured part of the code to permit command-line input of parameters rather than the pop-up box (permitting Paralyzer's use on larger clusters [it has been tested on a 60 CPU system]). Functionality is unchanged for most users, and both of Boris' updates have been incorporated in v1.5 (click link above to download). Thanks Boris!

Jun. 27, 2014:

Paralyzer has been updated to better handle T-fx diagrams, in response to some bugs identified by Anastasia Golubkova (ETH Zürich). It should now handle T-fO2 and P-fO2 diagrams without problem.

Nov. 8, 2013:

Several Windows users have been encountering problems with Paralyzer crashing (generally after the first instances of vertex are launched but before they all finish and Paralyzer tries to integrate results). In most cases this seems to be a problem with the time that Windows requires to create a new file, in which case it should be fixed in the current Paralyzer version (v1.3), which includes additional code to stop Matlab trying to open files that don't yet exist. To the best of my knowledge this problem never occurred on Macs, but the bug fix shouldn't introduce problems on OS X.

Jul. 4, 2013:

v1.2. A few loops have been re-organized. This neither removes nor (hopefully) introduces bugs, but reduces the amount of 'dead' time in which Matlab is thinking without fully utilizing CPU capacity for vertex. In calculations with a lot of segments (more than ~64) this version can speed things up by several minutes (or significantly more).

Jun. 21, 2013:

Paralyzer v1 released. This should work on Matlab running under most platforms, but has only been thoroughly tested on Mac OS 10.5 and higher.