-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixing the estimation of available cpus for a machine (localhost) #971
base: main
Are you sure you want to change the base?
Conversation
(now under the `machine_cpus` variable, no more `localhost_cpus`) This is done by using the `get_default_mpiprocs_per_machine` method of the computer node.
for more information, see https://pre-commit.ci
I take the information from the computer setup: ```python default_mpiprocs = computer.get_default_mpiprocs_per_machine() ```
…ab-qe into fix/cpu_count
for more information, see https://pre-commit.ci
self.num_cpus.value = 1 | ||
self.num_cpus.description = "CPUs" | ||
else: | ||
default_mpiprocs = computer.get_default_mpiprocs_per_machine() | ||
self.num_nodes.disabled = False | ||
self.num_cpus.max = default_mpiprocs | ||
self.num_cpus.value = default_mpiprocs | ||
self.num_cpus.value = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can fix the number of max cpus we can choose for a code, avoid the erroneous os.cpu_count
localhost_cpus = os.cpu_count() | ||
machine_cpus = orm.load_node( | ||
pw_code_model.selected | ||
).computer.get_default_mpiprocs_per_machine() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I called machine_cpus as is not more only for localhost_cpus
This fixes #937
This fixes #888
Issue #937 is fixed here,
while #888 is fixed here