timing

Implementation level

Type

Status

CML extraction template

image1

HTML5 representation

image2

Template attributes

Attribute

Value

source

CASTEP log

id

timing

name

CASTEP timing section

pattern

\s*Initialisation\stime.*

endPattern

\s*Peak\sMemory\sUse.*

endPattern2

~

endOffset

1

xml:base

timing.xml

Input

Initialisation time =      6.78 s
Calculation time    =      4.92 s
Finalisation time   =      0.06 s
Total time          =     11.76 s
Peak Memory Use     = 853140 kB

Output text

1<comment class="example.output" id="timing">
2        <module cmlx:templateRef="timing">
3            <scalar dataType="xsd:string" dictRef="ca:inittime" units="si:s">6.78</scalar>
4            <scalar dataType="xsd:string" dictRef="ca:calctime" units="si:s">4.92</scalar>
5            <scalar dataType="xsd:string" dictRef="ca:endtime" units="si:s">0.06</scalar>
6            <scalar dataType="xsd:string" dictRef="cc:wallTtime" units="si:s">11.76</scalar>
7            <scalar dataType="xsd:integer" dictRef="ca:peakmem" units="nonsi2:kilobyte">853140</scalar>
8        </module>
9    </comment>

Template definition

1<record>\s*Initialisation\stime\s*={A,ca:inittime}s\s*</record>
2<record>\s*Calculation\stime\s*={A,ca:calctime}s\s*</record>
3<record>\s*Finalisation\stime\s*={A,ca:endtime}s\s*</record>
4<record>\s*Total\stime\s*={A,cc:wallTtime}s\s*</record>
5<record>\s*Peak\sMemory\sUse\s*={I,ca:peakmem}.*</record>
6<transform process="pullup" xpath=".//cml:scalar" />
7<transform process="delete" xpath=".//cml:list" />
8<transform process="addUnits" xpath=".//cml:scalar[not(@dictRef='ca:peakmem')]" value="si:s" />
9<transform process="addUnits" xpath=".//cml:scalar[@dictRef='ca:peakmem']" value="nonsi2:kilobyte" />