Skip to content

Commit

Permalink
minor updates to reflect changes in firedrake packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tj-sun committed Aug 1, 2019
1 parent 0d96618 commit e95c93b
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 5 deletions.
Empty file added csv/empty
Empty file.
7 changes: 7 additions & 0 deletions csv/skylake_helmholtz_quad_1_1_omp_icc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n,p,f,dof,cell,add,sub,mul,div,mem,byte,time,ninst,nloops,extend_dof,extend_quad
8,1,0,81,64,150,0,287,9,20,2720,1.66416e-05,48,16,2,3
8,2,0,289,64,456,0,768,16,144,6336,2.451e-05,41,7,3,4
8,3,0,625,64,1065,0,1435,25,320,11936,3.543e-05,43,10,4,5
8,4,0,1089,64,1884,0,2412,36,600,19648,6.2704e-05,43,10,5,6
8,5,0,1681,64,3045,0,3759,49,1008,29472,9.6082e-05,43,10,6,7
8,6,0,2401,64,4608,0,5536,64,1568,41408,0.000108862,43,10,7,8
7 changes: 7 additions & 0 deletions csv/skylake_helmholtz_quad_1_1_ve_icc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n,p,f,dof,cell,add,sub,mul,div,mem,byte,time,ninst,nloops,extend_dof,extend_quad
8,1,0,81,64,150,0,287,9,20,2720,1.6164799999999998e-05,48,16,2,3
8,2,0,289,64,456,0,768,16,144,6336,2.1314e-05,41,7,3,4
8,3,0,625,64,1065,0,1435,25,320,11936,3.4331999999999996e-05,43,10,4,5
8,4,0,1089,64,1884,0,2412,36,600,19648,5.2356e-05,43,10,5,6
8,5,0,1681,64,3045,0,3759,49,1008,29472,8.3018e-05,43,10,6,7
8,6,0,2401,64,4608,0,5536,64,1568,41408,0.00011086399999999999,43,10,7,8
7 changes: 7 additions & 0 deletions csv/skylake_helmholtz_quad_1_4_omp_icc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n,p,f,dof,cell,add,sub,mul,div,mem,byte,time,ninst,nloops,extend_dof,extend_quad
8,1,0,81,64,150,0,287,9,20,2720,2.5033999999999998e-05,48,16,2,3
8,2,0,289,64,456,0,768,16,144,6336,3.2378e-05,41,7,3,4
8,3,0,625,64,1065,0,1435,25,320,11936,6.6184e-05,43,10,4,5
8,4,0,1089,64,1884,0,2412,36,600,19648,8.2254e-05,43,10,5,6
8,5,0,1681,64,3045,0,3759,49,1008,29472,0.000116158,43,10,6,7
8,6,0,2401,64,4608,0,5536,64,1568,41408,0.0001575,43,10,7,8
7 changes: 7 additions & 0 deletions csv/skylake_helmholtz_quad_1_4_ve_icc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n,p,f,dof,cell,add,sub,mul,div,mem,byte,time,ninst,nloops,extend_dof,extend_quad
8,1,0,81,64,150,0,287,9,20,2720,1.51158e-05,48,16,2,3
8,2,0,289,64,456,0,768,16,144,6336,2.1124e-05,41,7,3,4
8,3,0,625,64,1065,0,1435,25,320,11936,2.7084e-05,43,10,4,5
8,4,0,1089,64,1884,0,2412,36,600,19648,3.581e-05,43,10,5,6
8,5,0,1681,64,3045,0,3759,49,1008,29472,5.2022e-05,43,10,6,7
8,6,0,2401,64,4608,0,5536,64,1568,41408,6.5326e-05,43,10,7,8
9 changes: 7 additions & 2 deletions oneform.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@
print("CELLS= {0}".format(cells))
print("DOFS= {0}".format(dofs))

from loopy.program import make_program

knl = compile_form(y_form, coffee=False)[0].ast
warnings = list(knl.silenced_warnings)
warnings.extend(["insn_count_subgroups_upper_bound", "no_lid_found"])
knl = knl.copy(silenced_warnings=warnings)
op_map = lp.get_op_map(knl)
mem_map = lp.get_mem_access_map(knl, subgroup_size=1)
knl.options.ignore_boostable_into = True

program = make_program(knl)
op_map = lp.get_op_map(program, subgroup_size=1)
mem_map = lp.get_mem_access_map(program, subgroup_size=1)

for op in ['add', 'sub', 'mul', 'div']:
print("{0}S= {1}".format(op.upper(), op_map.filter_by(name=[op], dtype=[np.float64]).eval_and_sum({})))
Expand Down
8 changes: 6 additions & 2 deletions run_many_oneforms.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash
batchsize=(1 8)
batchsize=(1 4) # 1: not vectorize, 4: vectorize by 4
mesh=('quad' 'tri' 'hex' 'tetra')
# mesh=('quad')
form=('helmholtz' 'mass' 'laplacian' 'elasticity' 'hyperelasticity')
vs=('omp' 've')
# form=('helmholtz')
vs=('omp' 've') # vectorization strategy
export PYOP2_TIME=1 # switch on timing mode
export TJ_NP=1 # number of processes
for v in ${vs[@]}
do
for m in ${mesh[@]}
Expand Down
2 changes: 1 addition & 1 deletion run_oneforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_n(mesh, p):
result.append((n, p, f, dofs, cells, adds, subs, muls, divs, mems, bytes, time,
instructions, loops, dof_loop_extent, quadrature_loop_extent))

csvfile = open('results/vector/csv/{0}{1}_{2}_{3}_{4}_{5}{6}.csv'.format(prefix, form, mesh, str(np), simd_width, vect_strategy, suffix), 'w')
csvfile = open('csv/{0}{1}_{2}_{3}_{4}_{5}{6}.csv'.format(prefix, form, mesh, str(np), simd_width, vect_strategy, suffix), 'w')
writer = csv.writer(csvfile)
writer.writerows(result)
csvfile.close()

0 comments on commit e95c93b

Please sign in to comment.