Skip to content

jobcpu ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceGaussian log
idjobcpu
repeat*
pattern\s*Job cpu time:.*
endPattern\s*Normal termination.*
endOffset1
xml:basejobcpu.xml

Input ​

 Job cpu time:  0 days  0 hours  0 minutes 12.7 seconds.
 File lengths (MBytes):  RWF=     12 Int=      0 D2E=      0 Chk=      7 Scr=      1
 Normal termination of Gaussian 03 at Mon Nov 20 14:40:36 2006.

Output text ​

xml
<comment class="example.output" id="jobcpu">
    <module cmlx:templateRef="jobcpu">
      <scalar dictRef="cc:jobtime" dataType="xsd:string">PT12.700S</scalar>
      <scalar dataType="xsd:date" dictRef="cc:jobdatetime.end">2006-11-20T14:40:36Z</scalar>
      <scalar dataType="xsd:string" dictRef="cc:program">Gaussian 03</scalar>
    </module>
  </comment>

Template definition ​

xml
<record id="jobcpu">\s*Job cpu time:\s*&#123;X,cc:jobtime&#125;</record>
<record id="files" />
<record id="date">\s*Normal termination of &#123;X,cc:program&#125; at &#123;X,cc:jobdatetime.end&#125;\.\s*</record>
<transform process="createDate" xpath=".//cml:scalar[@dictRef='cc:jobtime']" format="DHMS" />
<transform process="createDate" xpath=".//cml:scalar[@dictRef='cc:jobdatetime.end']" format="EEE MMM d HH:mm:ss yyyy" />
<transform process="pullup" xpath=".//cml:scalar" />
<transform process="pullup" xpath=".//cml:scalar[@dictRef='cc:jobdatetime.end']" />
<transform process="pullup" xpath=".//cml:scalar[@dictRef='cc:program']" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />