<DiagnosticTests>
  <DiagnosticTest
    Name="MPI Pi Calculation with .bat PreStep"
    Description="Verify that the compute cluster can run an MPI job which approximates the value of Pi"
    Company="Microsoft"
    Suite="Samples"
    Alias="MPIPiCalc"
  >
    <!-- Give the parameters unique fixed-length SwitchNames so the PreStep parser can strip the data very easily. -->
    <!-- e.g. from -sn01:4 -sn02:1000000 you can slurp 4 and 1000000 at string index 6 of each parameter. -->
    <Parameters>
      <Parameter
        Name="NumMPIProcesses"
        SwitchName="sn01"
        Type="Integer"
        Description="The number of processes to launch with MPI"
        DefaultValue="6"
        MinimumValue="1"
        MaximumValue="1000000000"
        UseOnlyInStep="PreStep"/>
      <Parameter
        Name="NumIntervals"
        SwitchName="sn02"
        Type="String"
        Description="The number of intervals to use to approximate the value of Pi"
        DefaultValue="1E9"
        UseOnlyInStep="PreStep"/>
    </Parameters>
    <!-- Call a PreStep batch file to parse the parameters and add an MPI-based task to the diagnostic job. -->
    <!-- The batch file will be passed the two parameters e.g. -sn01:4 -sn02:1000000. -->
    <PreStep Command="&quot;\\%CCP_SCHEDULER%\C$\Diag\MPIPiCalculation\prestep.bat&quot;">
    </PreStep>
    <!-- There is no need to define a RunStep in this case. The PreStep adds a task to the job. The diagnostic run will submit the job in the RunStep. -->
  </DiagnosticTest>
</DiagnosticTests>
