Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CPU count parameter for cmft #2352

merged 1 commit into from
Oct 5, 2021


Copy link

Fixes #2344.

The CMFT sources state the following about the --numCpuProcessing parameter:

Should not be bigger than the number of physical CPU cores/threads.

Both multiprocessing.cpu_count() and os.cpu_count() return the number of logical CPU cores, which can be larger than the number of physical ones. Because the Python standard library doesn't provide a function for this, we need our own function that relies on some shell commands. In theory the Linux command can be executed without shell=True if you correctly pipe together the individual programs used in the command (like this), but my Ubuntu VM lags as hell and I didn't get it to work that way.

Tested on Windows 10 and a Ubuntu VM. I really appreciate if someone would test this on MacOS or another Linux distro.

@MoritzBrueckner MoritzBrueckner added the Release Notes: Fixes A pull request that fixes something. Used to generate release notes. label Oct 2, 2021
@luboslenco luboslenco merged commit d9ddb5f into armory3d:master Oct 5, 2021
@MoritzBrueckner MoritzBrueckner deleted the fix-cmft-cpu-count branch October 5, 2021 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Release Notes: Fixes A pull request that fixes something. Used to generate release notes.
None yet

Successfully merging this pull request may close these issues.

Radiance and Environment Texture HDRI causes error during compiling
2 participants