Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
7fa0e492
Commit
7fa0e492
authored
6 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
nvidia-probe.py should exit 1 if there is an error
Former-commit-id:
a45849c9
parent
baf2a426
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/slurm-common/files/scripts/nvidia-probe.py
+4
-4
4 additions, 4 deletions
roles/slurm-common/files/scripts/nvidia-probe.py
with
4 additions
and
4 deletions
roles/slurm-common/files/scripts/nvidia-probe.py
+
4
−
4
View file @
7fa0e492
...
...
@@ -23,7 +23,7 @@ import os
import
json
try
:
#run nvidia-smi -L to parse output
#run nvidia-smi -L to parse output
p
=
subprocess
.
Popen
([
'
nvidia-smi
'
,
'
-L
'
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
out
,
err
=
p
.
communicate
()
...
...
@@ -48,9 +48,9 @@ try:
if
os
.
path
.
exists
(
devicePath
):
#print "OK"
deviceList
.
append
(
{
'
name
'
:
'
gpu
'
,
'
file
'
:
devicePath
,
'
type
'
:
typeOfDevice
}
)
else
:
#
print
"E
rror
file not found ",
device
Path
sys
.
exit
(
0
)
else
:
print
(
"
e
rror
looking for nvidia
device
"
)
sys
.
exit
(
1
)
#now convert list to json
output
=
json
.
dumps
(
deviceList
)
print
output
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment