<?xml version="1.0"?>
<!-- CPLEX Virtual Machine Configuration File, version 1.0 -->
<!-- Copyright IBM Corporation 2013, 2017. All Rights Reserved. -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="vmc">
  <xsd:complexType>
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="machine" type="machine"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

<!-- Machine description looks like this
  <machine name="...">
    <transport type="...">
      For MPI transport
      <rank value="...">
      For TCP/IP transport
      <address host="..." port="..."/>
      <host value="..."/>
      <port value="..."/>
      Optional connection arguments
      <cmdline>
        <item value="...">
      </cmdline>
    </transport>
    Optional parameter settings
    <param name="..." value="..."/>
  </machine>
-->
<xsd:complexType name="machine">
  <xsd:sequence>
    <xsd:element name="transport" type="transport" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="param" type="param" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
  <xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>

<xsd:complexType name="transport">
  <xsd:sequence>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="rank">
        <xsd:complexType>
          <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="host">
        <xsd:complexType>
          <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="port">
        <xsd:complexType>
          <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="address">
        <xsd:complexType>
          <xsd:attribute name="host" type="xsd:string" use="required"/>
          <xsd:attribute name="port" type="xsd:string" use="required"/>
        </xsd:complexType>
      </xsd:element>
    </xsd:choice>
    <xsd:element name="cmdline" type="cmdline" minOccurs="0" maxOccurs="1"/>
  </xsd:sequence>
  <xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:complexType>

<xsd:complexType name="cmdline">
  <xsd:sequence>
    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
      <xsd:complexType>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
      </xsd:complexType>
    </xsd:element>
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="param">
  <xsd:attribute name="name" type="xsd:string" use="required"/>
  <xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>

</xsd:schema>
