walltime
Type |
Status |
---|---|
CML extraction template |
|
HTML5 representation |
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
1<comment class="example.output" id="walltime">
2 <module cmlx:templateRef="walltime">
3 <scalar dataType="xsd:string" dictRef="cc:walltime">2:32:38</scalar>
4 <scalar dataType="xsd:integer" dictRef="cc:walltime" id="walltime" units="si:s">9158</scalar>
5 </module>
6 </comment>
Template definition
1<record>\s*Total\swall\stime:{X,cc:walltime}</record>
2<transform process="copy" xpath=".//cml:scalar[@dictRef='cc:walltime']" to=".." id="walltimetmp" />
3<transform process="split" splitter=":" xpath=".//cml:scalar[@dictRef='cc:walltime' and @id='copy.0']" />
4<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]) )" />
5<transform process="pullup" xpath="./cml:list/cml:scalar" />
6<transform process="delete" xpath="./cml:list" />
7<transform process="addUnits" xpath="./cml:scalar[@id='walltime']" value="si:s" />
8<transform process="addAttribute" xpath="./cml:scalar[@id='walltime']" name="dataType" value="xsd:integer" />