File: tsrana.awk

package info (click to toggle)
p4est 2.3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,536 kB
  • sloc: ansic: 87,528; makefile: 855; sh: 635; perl: 272; python: 226; awk: 40; javascript: 23
file content (29 lines) | stat: -rwxr-xr-x 714 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /usr/bin/awk -f

BEGIN {
	print "# procs level shift refinelocal elements points Search_1 Search_N"
}
/refine-local:/ {
	if ($3 == "true") { refinelocal = 1 } else {refinelocal = 0 };
}
/New p(4|8)est/ {
	if ($3 == "p4est") { dim = 2 }
	else if ($3 == "p8est") { dim = 3 }
	#print "We are in dimension " dim
}
/^\[p4est\] Processors [[:digit:]]+ level/ {
	procs = $3
	level = $5
	shift = $7
	points = $9
	elems = 0
	#printf "Procs %d level %d shift %d points %d\n", procs, level, shift, points
}
/^\[p4est\] .* balanced to/ {
	elems = $9
}
/^\[p4est\] Summary =/ {
	# Output runtimes for: Search_1 Search_N
	printf "%d %d %d %d %d %d %g %g\n",
	       procs, level, shift, refinelocal, elems, points, $9, $10
}