none
Bug in XML parsing of Job Description files RRS feed

  • Question

  • Hi,

    I am using Python to write job description files (the .xml files).  Overall this is working really well...

    But, I am finding that the XML parser that is used in the HPC Job Manager/job scheduler has a problem with the ordering of XML attributes in the Job tag.

    Basically, if AutoCalculateMax="true" AutoCalculateMin="true" are put to early in the attribute list, they don't do anything.  I found this out because
    the Python XML writer, orders the attributes in alphabetical order and these attributes are put first (they start with "A").  Below, I have included an example
    that shows this behavior.  Just import the XML files into the Job Manager and you will see that it is NOT auto calculating the min/max.

    I have heard of XML readers/writers that don't preserve attribute order in round trips (parse, then write), but this is because these tools use something like an unordered data
    structure internally for the attributes.  But I have never heard of one whose parsing itself depends on the attribute order.  Can someone look into this issue?

    Cheers,

    Brian

    <?xml version="1.0" encoding="utf-8"?>
    <Job AutoCalculateMax="true" AutoCalculateMin="true" Version="2.000" Name="IPCluster" UnitType="Core" MaxCores="1" MaxNodes="1" MaxSockets="1" MinCores="1" MinNodes="1" MinSockets="1" RunUntilCanceled="false" IsExclusive="false" UserName="GNET\bgranger" JobType="Batch" Priority="Highest" Project="IPython" Owner="GNET\bgranger" xmlns="http://schemas.microsoft.com/HPCS2008/scheduler/">
        <Dependencies/>
        <Tasks>
            <Task CommandLine="\\blue\domainusers$\bgranger\Python\Python25\Scripts\ipcontroller.exe --log-to-file -p default --log-level 10" IsParametric="false" IsRerunnable="true" MaxCores="1" MaxNodes="1" MaxSockets="1" MinCores="1" MinNodes="1" MinSockets="1" StdErrFilePath="controller-err.txt" StdOutFilePath="controller-out.txt" TaskName="Controller" UnitType="Core" WorkDirectory="\\blue\domainusers$\bgranger\.ipython\cluster_default">
                <EnvironmentVariables>
                    <Variable>
                        <Name>PYTHONPATH</Name>
                        <Value>\\blue\domainusers$\bgranger\Python\Python25\Lib\site-packages</Value>
                    </Variable>
                </EnvironmentVariables>
            </Task>
        </Tasks>
    </Job>
    Tuesday, November 10, 2009 6:02 AM

Answers

  • Brian, 
     We are looking into the issue. This might be a bug on our part.
    In the meanwhile you could work around the issue by not writing out the mincores/minsockets/minnodes attributes if the autocalculatemin attribute is set to true. You could similarly not write out the maxcores/maxsockets/maxnodes attrubtes if the autocalcmax attribute is set.

    Hopefully this will let you work around this problem.

    Please let us know if this work around lets you create the jobs you want.

    thanks
    sayantan
    Monday, November 16, 2009 9:26 PM
    Moderator

All replies

  • Brian,
    Thanks for the feedback.  We're looking into it and should post back shortly.

    Thanks,
    Josh
    -Josh
    Monday, November 16, 2009 9:11 PM
    Moderator
  • What build of the HPC Pack are you running?  You can find this out by doing Help -> About in the UI.

    Thanks!
    Josh
    -Josh
    Monday, November 16, 2009 9:26 PM
    Moderator
  • Brian, 
     We are looking into the issue. This might be a bug on our part.
    In the meanwhile you could work around the issue by not writing out the mincores/minsockets/minnodes attributes if the autocalculatemin attribute is set to true. You could similarly not write out the maxcores/maxsockets/maxnodes attrubtes if the autocalcmax attribute is set.

    Hopefully this will let you work around this problem.

    Please let us know if this work around lets you create the jobs you want.

    thanks
    sayantan
    Monday, November 16, 2009 9:26 PM
    Moderator