From dc84b70956a0c0e70f2cd202fc758aeb33d64a73 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 2 Jul 2018 16:47:24 -0500 Subject: [PATCH] Add logging decorators to FMM expansion wrangler --- sumpy/fmm.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sumpy/fmm.py b/sumpy/fmm.py index ed2a1e4b..54ae8cbf 100644 --- a/sumpy/fmm.py +++ b/sumpy/fmm.py @@ -34,7 +34,10 @@ from six.moves import zip import pyopencl as cl import pyopencl.array # noqa -from pytools import memoize_method +from pytools import memoize_method, log_process + +import logging +logger = logging.getLogger(__name__) from sumpy import ( P2EFromSingleBox, P2EFromCSR, @@ -297,6 +300,7 @@ class SumpyExpansionWrangler(object): # }}} + @log_process(logger) def form_multipoles(self, level_start_source_box_nrs, source_boxes, src_weights): @@ -330,6 +334,7 @@ class SumpyExpansionWrangler(object): return mpoles + @log_process(logger) def coarsen_multipoles(self, level_start_source_parent_box_nrs, source_parent_boxes, @@ -385,6 +390,7 @@ class SumpyExpansionWrangler(object): return mpoles + @log_process(logger) def eval_direct(self, target_boxes, source_box_starts, source_box_lists, src_weights): pot = self.output_zeros() @@ -409,6 +415,7 @@ class SumpyExpansionWrangler(object): return pot + @log_process(logger) def multipole_to_local(self, level_start_target_box_nrs, target_boxes, src_box_starts, src_box_lists, @@ -448,6 +455,7 @@ class SumpyExpansionWrangler(object): return local_exps + @log_process(logger) def eval_multipoles(self, target_boxes_by_source_level, source_boxes_by_level, mpole_exps): pot = self.output_zeros() @@ -498,6 +506,7 @@ class SumpyExpansionWrangler(object): return pot + @log_process(logger) def form_locals(self, level_start_target_or_target_parent_box_nrs, target_or_target_parent_boxes, starts, lists, src_weights): @@ -536,6 +545,7 @@ class SumpyExpansionWrangler(object): return local_exps + @log_process(logger) def refine_locals(self, level_start_target_or_target_parent_box_nrs, target_or_target_parent_boxes, @@ -577,6 +587,7 @@ class SumpyExpansionWrangler(object): return local_exps + @log_process(logger) def eval_locals(self, level_start_target_box_nrs, target_boxes, local_exps): pot = self.output_zeros() @@ -612,6 +623,7 @@ class SumpyExpansionWrangler(object): return pot + @log_process(logger) def finalize_potentials(self, potentials): return potentials -- GitLab