From ff25a6e53bf69ff8f1a51dca00b6679ee0f51bd8 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 14 Sep 2017 18:46:26 -0500 Subject: [PATCH 1/2] Bump target weight to nonzero to avoid performance pathology (#72 on gitlab) --- pytential/qbx/geometry.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pytential/qbx/geometry.py b/pytential/qbx/geometry.py index 4138fbb6..1ab5224e 100644 --- a/pytential/qbx/geometry.py +++ b/pytential/qbx/geometry.py @@ -492,8 +492,12 @@ class QBXFMMGeometryData(object): self.coord_dtype) target_radii[:self.ncenters] = self.expansion_radii() - refine_weights = cl.array.zeros(queue, nparticles, dtype=np.int32) - refine_weights[:nsources] = 1 + # FIXME: https://gitlab.tiker.net/inducer/pytential/merge_requests/65 + # refine_weights = cl.array.zeros(queue, nparticles, dtype=np.int32) + # refine_weights[:nsources] = 1 + refine_weights = cl.array.empty(queue, nparticles, dtype=np.int32) + refine_weights.fill(1) + refine_weights.finish() tree, _ = code_getter.build_tree(queue, -- GitLab From 5abe2c8efac22cdcf47ec841da23f90ddff756b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Thu, 14 Sep 2017 19:49:05 -0400 Subject: [PATCH 2/2] Fix FIXME link in target reweighting --- pytential/qbx/geometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytential/qbx/geometry.py b/pytential/qbx/geometry.py index 1ab5224e..374d37d2 100644 --- a/pytential/qbx/geometry.py +++ b/pytential/qbx/geometry.py @@ -492,7 +492,7 @@ class QBXFMMGeometryData(object): self.coord_dtype) target_radii[:self.ncenters] = self.expansion_radii() - # FIXME: https://gitlab.tiker.net/inducer/pytential/merge_requests/65 + # FIXME: https://gitlab.tiker.net/inducer/pytential/issues/72 # refine_weights = cl.array.zeros(queue, nparticles, dtype=np.int32) # refine_weights[:nsources] = 1 refine_weights = cl.array.empty(queue, nparticles, dtype=np.int32) -- GitLab