File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -407,13 +407,12 @@ func ProcessTimeLimit(task *protos.TaskInfo) string {
407
407
408
408
// ReqMemPerNode (M)
409
409
func ProcessReqMemPerNode (task * protos.TaskInfo ) string {
410
- return strconv . FormatUint (task .ReqResView .AllocatableRes .MemoryLimitBytes / ( 1024 * 1024 ), 10 )
410
+ return util . FormatMemToMB (task .ReqResView .AllocatableRes .MemoryLimitBytes )
411
411
}
412
412
413
413
// AllocMemPerNode (m)
414
414
func ProcessAllocMemPerNode (task * protos.TaskInfo ) string {
415
- return strconv .FormatUint (
416
- task .AllocatedResView .AllocatableRes .MemoryLimitBytes / (1024 * 1024 ), 10 )
415
+ return util .FormatMemToMB (task .AllocatedResView .AllocatableRes .MemoryLimitBytes )
417
416
}
418
417
419
418
// NodeNum (N)
Original file line number Diff line number Diff line change @@ -348,13 +348,12 @@ func ProcessNodeList(task *protos.TaskInfo) string {
348
348
349
349
// 'm' group
350
350
func ProcessAllocMemPerNode (task * protos.TaskInfo ) string {
351
- return strconv .FormatUint (
352
- task .AllocatedResView .AllocatableRes .MemoryLimitBytes / (1024 * 1024 ), 10 )
351
+ return util .FormatMemToMB (task .AllocatedResView .AllocatableRes .MemoryLimitBytes )
353
352
}
354
353
355
354
// 'M' group
356
355
func ProcessReqMemPerNode (task * protos.TaskInfo ) string {
357
- return strconv . FormatUint (task .ReqResView .AllocatableRes .MemoryLimitBytes / ( 1024 * 1024 ), 10 )
356
+ return util . FormatMemToMB (task .ReqResView .AllocatableRes .MemoryLimitBytes )
358
357
}
359
358
360
359
// 'n' group
You can’t perform that action at this time.
0 commit comments