2024-04-11 23:04:30 +02:00
|
|
|
// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
|
2022-11-10 07:35:38 +01:00
|
|
|
// All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
|
2022-11-10 13:37:53 +01:00
|
|
|
import (
|
|
|
|
"github.com/ClusterCockpit/cc-backend/pkg/schema"
|
|
|
|
)
|
|
|
|
|
|
|
|
// type Accelerator struct {
|
|
|
|
// ID string `json:"id"`
|
|
|
|
// Type string `json:"type"`
|
|
|
|
// Model string `json:"model"`
|
|
|
|
// }
|
|
|
|
|
|
|
|
// type Topology struct {
|
|
|
|
// Node []int `json:"node"`
|
|
|
|
// Socket [][]int `json:"socket"`
|
|
|
|
// MemoryDomain [][]int `json:"memoryDomain"`
|
|
|
|
// Die [][]int `json:"die"`
|
|
|
|
// Core [][]int `json:"core"`
|
|
|
|
// Accelerators []*Accelerator `json:"accelerators"`
|
|
|
|
// }
|
|
|
|
|
2023-03-22 19:21:11 +01:00
|
|
|
type SubCluster struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Nodes string `json:"nodes"`
|
|
|
|
NumberOfNodes int `json:"numberOfNodes"`
|
|
|
|
ProcessorType string `json:"processorType"`
|
|
|
|
SocketsPerNode int `json:"socketsPerNode"`
|
|
|
|
CoresPerSocket int `json:"coresPerSocket"`
|
|
|
|
ThreadsPerCore int `json:"threadsPerCore"`
|
|
|
|
FlopRateScalar int `json:"flopRateScalar"`
|
|
|
|
FlopRateSimd int `json:"flopRateSimd"`
|
|
|
|
MemoryBandwidth int `json:"memoryBandwidth"`
|
|
|
|
Topology *schema.Topology `json:"topology"`
|
|
|
|
}
|
2022-11-10 13:37:53 +01:00
|
|
|
|
|
|
|
// type SubClusterConfig struct {
|
|
|
|
// Name string `json:"name"`
|
|
|
|
// Peak float64 `json:"peak"`
|
|
|
|
// Normal float64 `json:"normal"`
|
|
|
|
// Caution float64 `json:"caution"`
|
|
|
|
// Alert float64 `json:"alert"`
|
|
|
|
// }
|
2022-11-10 07:35:38 +01:00
|
|
|
|
|
|
|
type MetricConfig struct {
|
2022-11-10 13:37:53 +01:00
|
|
|
Name string `json:"name"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
Scope schema.MetricScope `json:"scope"`
|
2023-03-22 19:21:11 +01:00
|
|
|
Aggregation string `json:"aggregation"`
|
2022-11-10 13:37:53 +01:00
|
|
|
Timestep int `json:"timestep"`
|
2023-03-22 19:21:11 +01:00
|
|
|
Peak float64 `json:"peak"`
|
|
|
|
Normal float64 `json:"normal"`
|
|
|
|
Caution float64 `json:"caution"`
|
|
|
|
Alert float64 `json:"alert"`
|
2022-11-10 13:37:53 +01:00
|
|
|
SubClusters []*schema.SubClusterConfig `json:"subClusters"`
|
2022-11-10 07:35:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Cluster struct {
|
2023-03-22 19:21:11 +01:00
|
|
|
Name string `json:"name"`
|
|
|
|
MetricConfig []*MetricConfig `json:"metricConfig"`
|
|
|
|
SubClusters []*SubCluster `json:"subClusters"`
|
2022-11-10 07:35:38 +01:00
|
|
|
}
|