Input file not working - error message unhelpful
Forum » Forum / Support Questions » Input file not working - error message unhelpful
Started by: James AldousJames Aldous
On: 1276014405|%e %b %Y, %H:%M %Z|agohover
Number of posts: 4
rss icon RSS: New posts
Input file not working - error message unhelpful
James AldousJames Aldous 1276014405|%e %b %Y, %H:%M %Z|agohover

Sorry if this messages seems a little "ranty", but I feel like I'm bashing my head against a wall.

I've adapted the example Fe input.xml file to my material system - MnSb. It is a double hexagonal crystal of the NiAs type. I have included all of the atoms, specified the basis vectors and all other necessary variables. I have attempted to run the input file with increasingly fewer things to calculate - getting down to just the groundstate - and yet the input file doesn't run. All I get is:

PARSE_ERR                  
81 runParser
abort:

There is no reason that I can see in my input file for this error message. This new input file (copied in full below) is in a new directory in examples/, so the relative paths to the xml and species directories are the same as for Fe, and all the other example input.xml files.

I think this highlights however why I feel that informative error messages are absolutely vital. The above error message is next to useless as it provides no information to the user as to what is wrong, which part of the input file it cannot parse and give indications on how to correct the error. (Although the last part isn't necessary the first two are hugely important.)

Anyway, I really need to get this to work, so any help would, as always, be hugely appreciated.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="inputtohtml.xsl" type="text/xsl"?>

<input xsi:noNamespaceSchemaLocation="../../xml/excitinginput.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsltpath="../../../xml/">
  <title></title>
  <structure speciespath="../../species/">
    <crystal scale="4.128">
      <basevect> 0.8660  0.5000 0.0000</basevect>
      <basevect>-0.8669  0.5000 0.0000</basevect>
      <basevect> 0.0000  0.0000 1.4024</basevect>
    </crystal>
    <species speciesfile="Mn_Jim.xml">
      <atom coord="0.0  0.0  0.0" bfcmt="0.0  0.0  0.0"></atom>
      <atom coord="0.0  0.0  0.5" bfcmt="0.0  0.0  0.0"></atom>
    <species speciesfile="Sb_Jim.xml">
      <atom coord=" 0.2887  0.5000  0.3506" bfcmt="0.0  0.0  0.0"></atom>
      <atom coord="-0.2887  0.5000  1.0518" bfcmt="0.0  0.0  0.0"></atom>
    </species>
</structure>
<groundstate vkloff="0.5  0.5  0.5" nempty="10" ngridk="5 5 5">
<spin bfieldc="0.0  0.0  0.01" spinorb="true"></spin>
</groundstate>
<properties>
  <bandstructure>
    <plot1d>
      <path steps="200">
        <point coord="0.00000   0.00000   0.00000" label="GAMMA"></point>
        <point coord="1.00000   0.50000   0.00000" label="M"></point>
        <point coord="1.00000   0.00000   0.00000" label="K"></point>
        <point coord="0.00000   0.00000   0.00000" label="GAMMA"></point>
        <point coord="0.00000   0.00000   0.50000" label="A"></point>
        <point coord="1.00000   0.50000   0.50000" label="L"></point>
        <point coord="1.00000   0.00000   0.50000" label="H"></point>
        <point coord="0.00000   0.00000   0.50000" label="A"></point>
      </path>
    </plot1d>
  </bandstructure>
  <dos/>
</properties>
</input>
Reply  |  Options
Unfold Input file not working - error message unhelpful by James AldousJames Aldous, 1276014405|%e %b %Y, %H:%M %Z|agohover
Re: Input file not working - error message unhelpful
chmbergchmberg 1276078858|%e %b %Y, %H:%M %Z|agohover

Hi, this is not valid xml. The error is that you did not close the first species element

This should work

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="inputtohtml.xsl" type="text/xsl"?>
<input>
    <title></title>
    <structure speciespath="../../species/">
        <crystal scale="4.128">
            <basevect> 0.8660  0.5000 0.0000</basevect>
            <basevect>-0.8669  0.5000 0.0000</basevect>
            <basevect> 0.0000  0.0000 1.4024</basevect>
        </crystal>
        <species speciesfile="Mn_Jim.xml">
            <atom coord="0.0  0.0  0.0" bfcmt="0.0  0.0  0.0"></atom>
            <atom coord="0.0  0.0  0.5" bfcmt="0.0  0.0  0.0"></atom>
        </species>
        <species speciesfile="Sb_Jim.xml">
            <atom coord=" 0.2887  0.5000  0.3506" bfcmt="0.0  0.0  0.0"></atom>
            <atom coord="-0.2887  0.5000  1.0518" bfcmt="0.0  0.0  0.0"></atom>
        </species>
    </structure>
    <groundstate vkloff="0.5  0.5  0.5" nempty="10" ngridk="5 5 5">
        <spin bfieldc="0.0  0.0  0.01" spinorb="true"></spin>
    </groundstate>
    <properties>
        <bandstructure>
            <plot1d>
                <path steps="200">
                    <point coord="0.00000   0.00000   0.00000" label="GAMMA"></point>
                    <point coord="1.00000   0.50000   0.00000" label="M"></point>
                    <point coord="1.00000   0.00000   0.00000" label="K"></point>
                    <point coord="0.00000   0.00000   0.00000" label="GAMMA"></point>
                    <point coord="0.00000   0.00000   0.50000" label="A"></point>
                    <point coord="1.00000   0.50000   0.50000" label="L"></point>
                    <point coord="1.00000   0.00000   0.50000" label="H"></point>
                    <point coord="0.00000   0.00000   0.50000" label="A"></point>
                </path>
            </plot1d>
        </bandstructure>
        <dos/>
    </properties>
</input>

parse error usually means that the xml is not valid xml

Reply  |  Options
Unfold Re: Input file not working - error message unhelpful by chmbergchmberg, 1276078858|%e %b %Y, %H:%M %Z|agohover
Re: Input file not working - error message unhelpful
James AldousJames Aldous 1276114148|%e %b %Y, %H:%M %Z|agohover

Thank you. Just slid that in and it seems to be working.

I think my original point still stands, though. It would be nice if the error message said something meaningful. It is obvious that there was a parse error with the input file but no other information can be gleaned from the message. Any kind of information, for example "error near line x" or "unclosed declaration <species>", would be really nice. In this particular case I was just being an idiot, but but this input file is fairly simple and basic; with more complicated and complex input files, tracking down errors might prove more difficult (and frustrating).

Unfold Re: Input file not working - error message unhelpful by James AldousJames Aldous, 1276114148|%e %b %Y, %H:%M %Z|agohover
Re: Input file not working - error message unhelpful
chmbergchmberg 1276156738|%e %b %Y, %H:%M %Z|agohover

You are absolutely right, there should be some more error reporting done. Semantic errors such as unknown elements or attributes are handled but the syntax is not handled very well.
For minimizing frustration, some kind of xml editor is very, very helpful. I can recommend eclipse (how-to-setup-eclipse-as-xml-editor) or if you are prepared to spend money: oXigen.

Any XML editor will alarm you if your XML is invalid. They will even validate the input file against the schema and assist with the input.

Reply  |  Options
Unfold Re: Input file not working - error message unhelpful by chmbergchmberg, 1276156738|%e %b %Y, %H:%M %Z|agohover
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License