Locks in FFTW is limiting CPU efficiency when multi-threading
11/21/19 Haiwang Yu 1
Noise filtering with sticky code mitigation (SCM)https://github.com/WireCell/wire-cell-toolkit/pull/8
NF SP
http://www.fftw.org/fftw3_doc/Thread-safety.html
Protodune::StickyCodeMitig::apply()
FFT in SCM
Reading Eigen FFT code
11/21/19 Haiwang Yu 2
https://eigen.tuxfamily.org/dox/unsupported/ei__fftw__impl_8h_source.html
Plan caching
Thread unsafe
Eigen FFTW implementation has this plan caching feature!
Waveform::dft ⟹ Waveform::FFT::dft
11/21/19 Haiwang Yu 3
Plan cache destroyed in ‘Eigen::FFT’ dtor
Could create an ‘FFT’ instance for each INode using FFT. Then Plan cache could live the whole running period.Not many chances to hit the planner call locks
In the SCM code, FFT was performed 4 times per channel!A lot of creating new plans.
Plan caching FFT in MT mode
11/21/19 Haiwang Yu 4
SCM with Pgrapher - ST
11/21/19 Haiwang Yu 5
Next: mbCoherentNoiseSub
11/21/19 Haiwang Yu 6
updated with plan caching FFT:pdStickyCodeMitigpdOneChannelNoisepdRelGainCalib – no fft used
next:mbCoherentNoiseSub
SCM with Pgrapher - ST
11/21/19 Haiwang Yu 7
no fft
w/ fft no plan caching
w/ fft plan caching