Skip to content

Instantly share code, notes, and snippets.

View wence-'s full-sized avatar

Lawrence Mitchell wence-

  • A series of tubes
View GitHub Profile
@wence-
wence- / client-filter.json
Last active August 23, 2022 15:54
distributed merge profiles (after `get_comm_cost` change)
This file has been truncated, but you can view the full file.
{"$schema":"https://www.speedscope.app/file-format-schema.json","profiles":[{"type":"sampled","name":"Thread 470 \"MainThread\"","unit":"seconds","startValue":0.0,"endValue":299.99,"samples":[[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,2,1,0],[34,33
@wence-
wence- / nodes-1
Created June 28, 2022 16:25
dask-cuda merge scaling (dask backend)
Merge benchmark
--------------------------------------------------------------------------------
Backend | dask
Merge type | gpu
Rows-per-chunk | 40000000
Base-chunks | 4
Other-chunks | 4
Broadcast | default
Protocol | ucx
Device(s) | 0
from firedrake import *
mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, 'CG', 1)
u = TrialFunction(V)
v = TestFunction(V)
f = Function(V)
from firedrake import *
import numpy as np
import pytest
@pytest.mark.xfail(reason="Degree estimation wrong")
def test_high_order_coords():
m = UnitTriangleMesh()
V = VectorFunctionSpace(m, 'CG', 3)
f = Function(V)
ICs set up 03/07/16 15:23:36
Set up linear equations 03/07/16 15:23:36
Timestepping starting 03/07/16 15:23:37
t = 0.0 03/07/16 15:23:37
dtheta_star: -6.00668812945e-09 1.07098727075e-08
drho_star: -5.53360069622e-05 5.71035031064e-05
Residual norms for firedrake_snes_3_ solve.
0 KSP preconditioned resid norm 5.617758284543e+08 true resid norm 3.937251360868e+06 ||r(i)||/||b|| 1.000000000000e+00
1 KSP preconditioned resid norm 6.624693636483e+06 true resid norm 1.898470635118e+06 ||r(i)||/||b|| 4.821817204731e-01
2 KSP preconditioned resid norm 2.572441914898e+06 true resid norm 5.540652907492e+05 ||r(i)||/||b|| 1.407238806889e-01
ICs set up 03/07/16 11:17:44
Set up linear equations 03/07/16 11:17:44
Timestepping starting 03/07/16 11:17:44
t = 0.0 03/07/16 11:17:44
dtheta_star: -8.00627691458e-09 5.12351283846e-09
drho_star: -0.000122223909836 0.000114651228023
Residual norms for firedrake_snes_3_ solve.
0 KSP preconditioned resid norm 1.647645011758e+09 true resid norm 1.564857715882e+07 ||r(i)||/||b|| 1.000000000000e+00
1 KSP preconditioned resid norm 2.058999636856e+07 true resid norm 5.571029516131e+06 ||r(i)||/||b|| 3.560086939274e-01
2 KSP preconditioned resid norm 8.388635093296e+06 true resid norm 1.965073175887e+06 ||r(i)||/||b|| 1.255751980480e-01
ed08681... 03/07/16 11:21 public
f19c5ee... 03/07/16 11:13 public
bf39106... 03/07/16 09:05 public
5c94a30... 02/29/16 13:51 public
610f270... 02/29/16 13:17 public
5c51156... 02/29/16 11:46 public
fd2434a... 02/10/16 14:36 public
dae6162... 02/10/16 14:34 public
fb8bf2c... 02/10/16 14:23 public
fa9f7c3... 02/10/16 10:28 public
{'pc_type': 'fieldsplit',
'pc_fieldsplit_type': 'schur',
'ksp_type': 'fgmres',
'ksp_monitor_true_residual': True,
'ksp_max_it': 100,
'ksp_gmres_restart': 50,
'pc_fieldsplit_schur_fact_type': 'FULL',
'pc_fieldsplit_schur_precondition': 'selfp',
'fieldsplit_0_ksp_type': 'richardson',
'fieldsplit_0_ksp_max_it': 2,
pc_1_params = {'fieldsplit_1_pc_type': 'hypre',
'fieldsplit_1_pc_hypre_type': 'boomeramg',
'fieldsplit_1_pc_hypre_boomeramg_max_iter':1,
'fieldsplit_1_pc_hypre_boomeramg_agg_nl':0,
'fieldsplit_1_pc_hypre_boomeramg_coarsen_type':'Falgout',
'fieldsplit_1_pc_hypre_boomeramg_smooth_type':'Euclid',
'fieldsplit_1_pc_hypre_boomeramg_eu_bj':1,
'fieldsplit_1_pc_hypre_boomeramg_interptype':'classical',
'fieldsplit_1_pc_hypre_boomeramg_P_max':0,
'fieldsplit_1_pc_hypre_boomeramg_agg_nl':0,
w_theta = Function(V)
_, sigma_theta = split(w_theta)
theta_form = m*det(I + sigma_theta)*dx
theta = Constant(assemble(theta_form)/total_area)
def updatetheta(snes, it, rnorm, constant, w_theta):
x = snes.getSolution()
with w_theta.dat.vec as v:
x.copy(v)
constant.assign(assemble(theta_form)/total_area)