From dafe0c514333bd09acbf9e6a05f4a1354c45fea0 Mon Sep 17 00:00:00 2001 From: Nicolas Perrin Date: Wed, 25 Aug 2021 11:42:09 +0200 Subject: [PATCH 1/5] Disable some hwloc components under Debian 11 on clusters without GPU --- g5k-postinstall | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/g5k-postinstall b/g5k-postinstall index b2a003b4..1eb1c85e 100755 --- a/g5k-postinstall +++ b/g5k-postinstall @@ -769,6 +769,19 @@ if $mysite == 'nancy' and ( $mycluster == 'grcinq' or $mycluster == 'grvingt' ) end end +# Disable some hwloc components under Debian 11 on clusters without GPU. +# cf. Bug #13260 +envrelease = IO::read("#{DSTDIR}/etc/grid5000/release") rescue "" +refapinode = IO::read("#{DSTDIR}/etc/grid5000/ref-api.json") rescue "" +if /debian11.*-(big|std)/.match?(envrelease) && !/gpu_devices/.match?(refapinode) + $logger.info("Disabling some hwlock components") + File::open("#{DSTDIR}/etc/environment", "w") do |fd| + fd.puts <<-EOF +HWLOC_COMPONENTS=-opencl,-cuda,-nvml + EOF + end +end + ############################## bootloader ##################################### FileUtils.mkdir_p('/var/lib/kadeploy/bootloader/') -- GitLab From 323e5c1823a941f8debdd590c41039c79386b09e Mon Sep 17 00:00:00 2001 From: Nicolas Perrin Date: Wed, 25 Aug 2021 14:46:25 +0200 Subject: [PATCH 2/5] GPU presence check improvement and not with no_ref_api --- g5k-postinstall | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/g5k-postinstall b/g5k-postinstall index 1eb1c85e..c7afe4ed 100755 --- a/g5k-postinstall +++ b/g5k-postinstall @@ -769,16 +769,17 @@ if $mysite == 'nancy' and ( $mycluster == 'grcinq' or $mycluster == 'grvingt' ) end end -# Disable some hwloc components under Debian 11 on clusters without GPU. +# Disable some hwloc components under Debian 11 big and std on clusters without GPU. # cf. Bug #13260 -envrelease = IO::read("#{DSTDIR}/etc/grid5000/release") rescue "" -refapinode = IO::read("#{DSTDIR}/etc/grid5000/ref-api.json") rescue "" -if /debian11.*-(big|std)/.match?(envrelease) && !/gpu_devices/.match?(refapinode) - $logger.info("Disabling some hwlock components") - File::open("#{DSTDIR}/etc/environment", "w") do |fd| - fd.puts <<-EOF -HWLOC_COMPONENTS=-opencl,-cuda,-nvml - EOF +unless $no_ref_api + envrelease = IO::read("#{DSTDIR}/etc/grid5000/release") rescue "" + if /debian11.*-(big|std)/.match?(envrelease) && myjson.key?('gpu_devices') + $logger.info("Disabling some hwlock components") + File::open("#{DSTDIR}/etc/environment", "a") do |fd| + fd.puts <<-EOF + HWLOC_COMPONENTS=-opencl,-cuda,-nvml + EOF + end end end -- GitLab From ca995a89c0296358e3c50acc4ee87a02f3fb3ca2 Mon Sep 17 00:00:00 2001 From: Nicolas Perrin Date: Wed, 25 Aug 2021 14:53:53 +0200 Subject: [PATCH 3/5] Typo fix --- g5k-postinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g5k-postinstall b/g5k-postinstall index c7afe4ed..7bf4e80a 100755 --- a/g5k-postinstall +++ b/g5k-postinstall @@ -777,7 +777,7 @@ unless $no_ref_api $logger.info("Disabling some hwlock components") File::open("#{DSTDIR}/etc/environment", "a") do |fd| fd.puts <<-EOF - HWLOC_COMPONENTS=-opencl,-cuda,-nvml +HWLOC_COMPONENTS=-opencl,-cuda,-nvml EOF end end -- GitLab From 3aab48edd57b3aee6e98c1ebb39ee0b4931936a8 Mon Sep 17 00:00:00 2001 From: Nicolas Perrin Date: Wed, 25 Aug 2021 15:29:26 +0200 Subject: [PATCH 4/5] Typo fix 2 --- g5k-postinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g5k-postinstall b/g5k-postinstall index 7bf4e80a..bd91d593 100755 --- a/g5k-postinstall +++ b/g5k-postinstall @@ -773,7 +773,7 @@ end # cf. Bug #13260 unless $no_ref_api envrelease = IO::read("#{DSTDIR}/etc/grid5000/release") rescue "" - if /debian11.*-(big|std)/.match?(envrelease) && myjson.key?('gpu_devices') + if /debian11.*-(big|std)/.match?(envrelease) && $myjson.key?('gpu_devices') $logger.info("Disabling some hwlock components") File::open("#{DSTDIR}/etc/environment", "a") do |fd| fd.puts <<-EOF -- GitLab From 53a2df9d1f0456afc84e1f044f57d3e7f763ece0 Mon Sep 17 00:00:00 2001 From: Nicolas Perrin Date: Wed, 25 Aug 2021 15:44:42 +0200 Subject: [PATCH 5/5] Node with NO GPU ! --- g5k-postinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g5k-postinstall b/g5k-postinstall index bd91d593..b23df9f3 100755 --- a/g5k-postinstall +++ b/g5k-postinstall @@ -773,7 +773,7 @@ end # cf. Bug #13260 unless $no_ref_api envrelease = IO::read("#{DSTDIR}/etc/grid5000/release") rescue "" - if /debian11.*-(big|std)/.match?(envrelease) && $myjson.key?('gpu_devices') + if /debian11.*-(big|std)/.match?(envrelease) && !$myjson.key?('gpu_devices') $logger.info("Disabling some hwlock components") File::open("#{DSTDIR}/etc/environment", "a") do |fd| fd.puts <<-EOF -- GitLab