Smorodov / Multitarget-tracker

Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Apache License 2.0
2.19k stars 650 forks source link

"#pragma omp parallel for" cause huge cpu usage! #349

Open tienvominh opened 3 years ago

tienvominh commented 3 years ago

I don't know why but try to remove this one (in Ctracker.cpp) will get better tracking performance.

Nuzhny007 commented 3 years ago

Where? Maybe it was my error

tienvominh commented 3 years ago

from line 158 of: https://github.com/Smorodov/Multitarget-tracker/blob/add-license-1/src/Tracker/Ctracker.cpp

Nuzhny007 commented 3 years ago

But in master it's ok, L347: https://github.com/Smorodov/Multitarget-tracker/blob/master/src/Tracker/Ctracker.cpp#L347

tienvominh commented 3 years ago

Sorry my mistake i picked wrong file to show you, the issue from master branch. Testing from both windows 10 64 bit PCs

Nuzhny007 commented 3 years ago

So where is problem now?

tienvominh commented 3 years ago

without remove "#pragma omp parallel for" the cpu usage is very high (> 60 %) for command "../../data/atrium.avi -e=6 -a=0". I don't know why but after remove "#pragma omp parallel for" the cpu usage is about 15%. Processor: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz 2.93 Ram: 12.0 GB Graphic: NVIDIA 1050i

Nuzhny007 commented 3 years ago

With omp parallel process utilized all CPU cores: more cores - high usage. It's normal