Melts‐batch use - magmasource/MAGMA GitHub Wiki

The Melts-batch file is an executable image that you can run by typing this command:

./Melts-batch

The command generates the following output detailing usage:

Usage:
  Melts-batch input.melts
  Melts-batch input.xml
  Melts-batch inputDir outputDir [inputProcessedDir]
              Directories are stipulated relative to current directory with no trailing delimiter.

The three usage scenarios are as follows:

  • First usage takes a standard MELTS input file as input on the command line and processes it using MELTS version 1.0.2, placing output files in the current directory.

  • Second usage processes a MELTS input file formatted using the standard MELTS input XML schema (contained in schema definition file MELTSinput.xsd) and processes it using the MELTS/pMELTS version specified in that file, placing output files in the current directory.

    • The output file ending *-out.xml will contain output for the last step in the calculation sequence. On the MAGMA branch another file is produced ending *-sequence.xml which contains output for all steps, similar to the MELTS web services output (see below).
    • Note that changing MELTS/pMELTS model from the compiled default using the XML input file only works on the MAGMA branch.
  • Third usage places the executable in listening mode. The program waits for a file to be placed in the specified inputDir, processes that file, and places output into the outputDir, moving the input file in the inputProcessedDir if one is specified. This usage is appropriate if some other program (like Excel) is used to generate input files and waits until output is produced for subsequent processes. A typical command for this usage scenario may look like this:

    ./Melts-batch ./inputXML ./outputXML ./processedXML
    

    where the various directories must exist prior to starting the batch process.

Input files for the second and third usage must conform to the XML schema noted in the second usage (MELTSinput.xsd), and output files are generated according to XML output schema specified in MELTSoutput.xsd and MELTSstatus.xsd. These schema are also utilized in client-server communication involving the MELTS web services (see below). Detailed documentation files on all of the XML schema may be found in the MELTS Web Services page. The main difference between the MAGMA branch version of the MELTS input XML schema and the web services one is the introduction of a <finalize /> tag that is used to complete and close the *-seqence.xml output file.

⚠️ **GitHub.com Fallback** ⚠️