preraulab / multitaper_toolbox

A multitaper spectral estimation toolbox implemented in Matlab, Python, and R
61 stars 24 forks source link

UserWarning: resource_tracker #4

Open virsto opened 1 year ago

virsto commented 1 year ago

The only way that I have found to execute your example without this UserWarning is to set multiprocess = False. I am running your multitaper_toolbox on Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on a Windows 10 platform. Unfortunately, I have been unable to find the actual source of what causes these user warnings. I do like your code for the multitaper PSD -- I am trying to use it on EKG signals (MIT Physionet EKG resources).

You might be interested to know that my 7-core laptop withmultiprocess = True, "Multitaper compute time: 2.42 seconds", while with multiprocess = False, "Multitaper compute time: 0.31 seconds".

I hope that this information can be usefu :-)

thpossidente commented 1 year ago

Thank you for your feedback - it's much appreciated.

Is the time difference in multiprocessing using your own data or the example data?

One thing that could be causing the time difference in multiprocessing is if the data segment you are using is very short. There is a time overhead associated with using parallel processing - so in some cases it can take longer than running without parallel.

If you are using your own data, could you send the (deidentified) data you are using to tpossidente@bwh.harvard.edu in order for us to investigate this resource_tracker warning?

Best, Tom