diff --git a/lollipop/cli/deconvolute.py b/lollipop/cli/deconvolute.py index 2bc796b..023e735 100755 --- a/lollipop/cli/deconvolute.py +++ b/lollipop/cli/deconvolute.py @@ -14,7 +14,7 @@ import pandas as pd import numpy as np from tqdm import tqdm, trange -from threadpoolctl import threadpool_info, ThreadpoolController +from threadpoolctl import threadpool_info, ThreadpoolController, threadpool_limits import lollipop as ll @@ -147,6 +147,11 @@ def _deconvolute_bootstrap( List[pd.DataFrame] The deconvolution results for the location and bootstrap iterations. """ + print("Threadpool: ", threadpool_info()) + + logging.warning(threadpool_info()) + + controller = ThreadpoolController() # deconvolution results deconv = [] @@ -243,10 +248,8 @@ def _deconvolute_bootstrap( confint=confint(**confint_params), **weights, ) - - logging.warning(threadpool_info()) - - t_kdec = t_kdec.deconv_all(**deconv_params) + with controller.limit(limits=1, user_api='blas'): + t_kdec = t_kdec.deconv_all(**deconv_params) if have_confint: # with conf int