walltime ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | LAMMPS log |
| id | walltime |
| pattern | \s*Total\swall\stime.* |
| endPattern | \s* |
| endPattern2 | ~ |
| xml:base | job/walltime.xml |
Input ​
Total wall time: 5:33:31
Output text ​
xml
<comment class="example.output" id="walltime">
<module cmlx:templateRef="walltime">
<scalar dataType="xsd:string" dictRef="cc:walltime">2:32:38</scalar>
<scalar dataType="xsd:integer" dictRef="cc:walltime" id="walltime" units="si:s">9158</scalar>
</module>
</comment>Template definition ​
xml
<record>\s*Total\swall\stime:{X,cc:walltime}</record>
<transform process="copy" xpath=".//cml:scalar[@dictRef='cc:walltime']" to=".." id="walltimetmp" />
<transform process="split" splitter=":" xpath=".//cml:scalar[@dictRef='cc:walltime' and @id='copy.0']" />
<transform process="addChild" xpath="." elementName="cml:scalar" id="walltime" dictRef="cc:walltime" value="$number( number(.//cml:list/cml:list/cml:scalar[position() = 1]) * 3600 + number(.//cml:list/cml:list/cml:scalar[position() = 2]) * 60 + number(.//cml:list/cml:list/cml:scalar[position() = 3]) )" />
<transform process="pullup" xpath="./cml:list/cml:scalar" />
<transform process="delete" xpath="./cml:list" />
<transform process="addUnits" xpath="./cml:scalar[@id='walltime']" value="si:s" />
<transform process="addAttribute" xpath="./cml:scalar[@id='walltime']" name="dataType" value="xsd:integer" />