Skip to content
Snippets Groups Projects
Commit 6542dd2a authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Danny Auble
Browse files

GPU - Fix checking frequencies to check them all and not skip the last one.

Fix _get_nearest_freq()

Check the last element from freqs.
This fixes such case:
freqs[freqs_size - 2] > freq >= freqs[freqs_size - 1]

Bug 14593
parent 9feea0e7
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ documents those changes that are of interest to users and administrators.
-- Wait up to PrologEpilogTimeout before shutting down slurmd to allow prolog
and epilog scripts to complete or timeout. Previously, slurmd waited 120
seconds before timing out and killing prolog and epilog scripts.
-- GPU - Fix checking frequencies to check them all and not skip the last one.
 
* Changes in Slurm 22.05.2
==========================
......
......@@ -209,7 +209,7 @@ extern void gpu_common_get_nearest_freq(unsigned int *freq,
}
/* check for frequency, and round up if no exact match */
for (i = 0; i < freqs_size - 1;) {
for (i = 0; i < freqs_size;) {
if (*freq == freqs[i]) {
/* No change necessary */
debug2("No change necessary. Freq: %u MHz", *freq);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment