~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to bench/fem/assembly/bench.py

  • Committer: Niclas Jansson
  • Date: 2010-10-17 10:21:52 UTC
  • Revision ID: njansson@csc.kth.se-20101017102152-e6u3c9uwxa4z19c8
Minor fixes in configure.ac

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
#
3
 
# Copyright (C) 2007 Anders Logg.
4
 
# Licensed under the GNU LGPL Version 2.1.
5
 
#
6
 
# Run benchmark for fem assembly.
7
 
 
8
 
from os import system
9
 
from time import time
10
 
 
11
 
# Log file
12
 
logfile = "bench.log"
13
 
 
14
 
# Run benchmark
15
 
tic = time()
16
 
system("./dolfin-fem-assembly-bench")
17
 
toc = time() - tic
18
 
 
19
 
# Save timing to log file
20
 
system("pkg-config --modversion dolfin >> " + logfile)
21
 
system("date >> " + logfile)
22
 
file = open(logfile, "a")
23
 
file.write("CPU time: %g\n" % toc)
24
 
file.write("----------------------------------------\n")
25
 
file.close()