Skip to content

Commit

Permalink
Fix #720 - JobAndMark computation + related tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars T Hansen committed Jan 15, 2025
1 parent fa773dd commit 754b42c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions code/generate-table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ they must also be added to the table. This is flagged with a comment and is OK,
bit might be better. And so instead of the config / NeedsConfig attribute there may be a more
general flags attribute on fields: flag:"slurm", flag:"config|slurm".

We should check that every alias definition references fields or other aliases, and that there are
no circular aliases, and that no aliases are defined multiple times. For very wide tables such as
jobs there have been bugs where aliases point to nothing.

### DONTDO

While it's tempting to put all the output definitions together in some sort of struct, allowing them
Expand Down
2 changes: 1 addition & 1 deletion code/sonalyze/cmd/jobs/jobs-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ var jobsAliases = map[string][]string{
"Gpu": []string{"GpuAvgPct", "GpuPeakPct"},
"RelativeGpu": []string{"RelativeGpuAvgPct", "RelativeGpuPeakPct"},
"OccupiedRelativeGpu": []string{"OccupiedRelativeGpuAvgPct", "OccupiedRelativeGpuPeakPct"},
"GpuMem": []string{"GpuMemAvgPct", "GpuMemPeakPct"},
"GpuMem": []string{"GpuMemAvgGB", "GpuMemPeakGB"},
"RelativeGpuMem": []string{"RelativeGpuMemAvgPct", "RelativeGpuMemPeakPct"},
"OccupiedRelativeGpuMem": []string{"OccupiedRelativeGpuMemAvgPct", "OccupiedRelativeGpuMemPeakPct"},
"default": []string{"std", "cpu", "mem", "gpu", "gpumem", "cmd"},
Expand Down
2 changes: 1 addition & 1 deletion code/sonalyze/cmd/jobs/perform.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (jc *JobsCommand) aggregateAndFilterJobs(
needCmd = true
case "host", "Host":
needHost = true
case "jobm", "JobsAndMark":
case "jobm", "JobAndMark":
needJobAndMark = true
case "Submit", "JobName", "State", "Account", "Layout", "Reservation",
"Partition", "RequestedGpus", "DiskReadAvgGB", "DiskWriteAvgGB",
Expand Down
2 changes: 1 addition & 1 deletion code/sonalyze/cmd/jobs/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ ALIASES
RelativeGpu RelativeGpuAvgPct,RelativeGpuPeakPct
OccupiedRelativeGpu \
OccupiedRelativeGpuAvgPct,OccupiedRelativeGpuPeakPct
GpuMem GpuMemAvgPct,GpuMemPeakPct
GpuMem GpuMemAvgGB,GpuMemPeakGB
RelativeGpuMem \
RelativeGpuMemAvgPct,RelativeGpuMemPeakPct
OccupiedRelativeGpuMem \
Expand Down

0 comments on commit 754b42c

Please sign in to comment.