From 4cdc7880ca0640c55d762c677e39073311822f48 Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum <lucas.nussbaum@loria.fr> Date: Wed, 1 Jul 2020 16:59:26 +0200 Subject: [PATCH] [dev/oar-prop] raise a message when invalid number of GPU ids --- lib/refrepo/gen/oar-properties.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb index 6f854419611..640f18e4830 100644 --- a/lib/refrepo/gen/oar-properties.rb +++ b/lib/refrepo/gen/oar-properties.rb @@ -1304,9 +1304,11 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s expected_phys_rsc_count = variables[:per_cluster_count] if phys_rsc_ids.length != expected_phys_rsc_count - if ["cpu", "core"].include? physical_resource + if ["cpu", "core", "gpu"].include? physical_resource puts("#{physical_resource.upcase} has an unexpected number of resources (current:#{phys_rsc_ids.length} vs expected:#{expected_phys_rsc_count}).") - raise "unexpected number (current:#{phys_rsc_ids.length} vs expected:#{expected_phys_rsc_count}) of resources for cluster #{cluster_name}" + if ["cpu", "core"].include? physical_resource # this problem is not fatal for GPUs + raise "unexpected number (current:#{phys_rsc_ids.length} vs expected:#{expected_phys_rsc_count}) of resources for cluster #{cluster_name}" + end end end -- GitLab