Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 61a5b4bd authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

[dev/oar-prop] Improve assignment of GPU ids

parent 4cdc7880
No related branches found
No related tags found
1 merge request!118Oar-properties generator: improve assignment of GPU ids to deal with removal of GPUs
...@@ -1432,7 +1432,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s ...@@ -1432,7 +1432,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
# id of the selected GPU in the node # id of the selected GPU in the node
local_id = node_description["gpu_devices"].values.index(selected_gpu) local_id = node_description["gpu_devices"].values.index(selected_gpu)
row[:gpu] = phys_rsc_map["gpu"][:current_ids][node_index0 * gpu_count + local_id] # to assign the gpu number, just use the number of nodes and the number of GPUs per node
# sanity check: we must fall into the correct range
gpu = phys_rsc_map["gpu"][:current_ids].min + node_index0 * gpu_count + local_id
if gpu > phys_rsc_map["gpu"][:current_ids].max
raise "Invalid GPU number for cluster #{cluster_name}"
end
row[:gpu] = gpu
row[:gpudevice] = local_id row[:gpudevice] = local_id
row[:gpudevicepath] = selected_gpu['device'] row[:gpudevicepath] = selected_gpu['device']
row[:gpumodel] = selected_gpu['model'] row[:gpumodel] = selected_gpu['model']
......
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