-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SlurmScheduler
: fix bug in validation of job resources (#4555)
The `SlurmJobResource` resource class used by the `SlurmScheduler` plugin contained a bug in the `validate_resources` methods that would cause a float value to be set for the `num_cores_per_mpiproc` field in certain cases. This would cause the submit script to fail because SLURM only accepts integers for the corresponding `--ncpus-per-task` flag. The reason is that the code was incorrectly using `isinstance(_, int)` to check that the divison of `num_cores_per_machine` over `num_mpiprocs_per_machine` is an integer. In addition to the negation missing in the conditional, this is not the correct way of checking whether a division is an integer. Instead it should check that the value is identical after it is cast to `int`.
- Loading branch information
1 parent
ac4c881
commit c42a86b
Showing
2 changed files
with
117 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters