mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Fine tune schema and job archive migration
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
package schema
|
||||
|
||||
import "strconv"
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type Accelerator struct {
|
||||
ID string `json:"id"`
|
||||
@@ -157,6 +160,15 @@ func (topo *Topology) GetMemoryDomainsFromHWThreads(
|
||||
return memDoms, exclusive
|
||||
}
|
||||
|
||||
// Temporary fix to convert back from int id to string id for accelerators
|
||||
func (topo *Topology) GetAcceleratorID(id int) (string, error) {
|
||||
if id < len(topo.Accelerators) {
|
||||
return topo.Accelerators[id].ID, nil
|
||||
} else {
|
||||
return "", fmt.Errorf("Index %d out of range", id)
|
||||
}
|
||||
}
|
||||
|
||||
func (topo *Topology) GetAcceleratorIDs() ([]int, error) {
|
||||
accels := make([]int, 0)
|
||||
for _, accel := range topo.Accelerators {
|
||||
|
@@ -479,7 +479,7 @@
|
||||
]
|
||||
},
|
||||
"required": [
|
||||
"cpu_used",
|
||||
"cpu_user",
|
||||
"mem_used",
|
||||
"flops_any",
|
||||
"mem_bw",
|
||||
|
@@ -15,7 +15,6 @@
|
||||
"F/s",
|
||||
"CPI",
|
||||
"IPC",
|
||||
"load",
|
||||
"Hz",
|
||||
"W",
|
||||
"°C",
|
||||
|
Reference in New Issue
Block a user