Closed ahmed-alhindawi closed 4 years ago
Thanks a lot @ngageorange!!!
Just as a thought - would those environment variables have been better off being in the roslaunch as an <env>
tag with arguments from the command line? It feels that having psutil
as a dependency purely to see how many CPU cores are available is probably unnecessary, especially as the <env>
tag exists.
What do you think?
Hmmm. I did not even realise the PR introduced another external dependency. How about using multiprocessing.cpu_count()
instead? That's in the standard library.
That provides hyperthreaded CPU count which PyTorch seem to be particularly keen on avoiding; on my system multiprocessing.cpu_count()
returns 16 when it should be 8. Hence the external dependency.
I think a grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}'
set to an environment variable during roslaunch would suffice for OMP_THREAD_NUM. The others can be made static...
What do you think?
That sounds good to me. Feel free to push directly to master. Thanks Ahmed!