slurm

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "slurm"
View Source
const TopologyHeader = `` /* 204-byte string literal not displayed */

Variables

This section is empty.

Functions

func GenerateOutput

func GenerateOutput(ctx context.Context, tree *topology.Vertex, params map[string]any) ([]byte, *httperr.Error)

func GenerateOutputParams

func GenerateOutputParams(ctx context.Context, root *topology.Vertex, params *Params) ([]byte, *httperr.Error)

func GetFakeNodes

func GetFakeNodes(ctx context.Context) (string, error)

func GetNodeList

func GetNodeList(ctx context.Context) ([]string, error)

func GetPartitionNodes

func GetPartitionNodes(ctx context.Context, partition string, f *TopologyNodeFinder) ([]string, error)

func GetTranslateConfig

func GetTranslateConfig(ctx context.Context, params *BaseParams, f *TopologyNodeFinder) (*translate.Config, error)

func NamedLoader

func NamedLoader() (string, engines.Loader)

Types

type BaseParams

type BaseParams struct {
	Plugin           string               `mapstructure:"plugin"`
	BlockSizes       string               `mapstructure:"block_sizes"`
	FakeNodesEnabled bool                 `mapstructure:"fakeNodesEnabled"`
	FakeNodePool     string               `mapstructure:"fake_node_pool"`
	Topologies       map[string]*Topology `mapstructure:"topologies,omitempty"`
}

type Params

type Params struct {
	BaseParams     `mapstructure:",squash"`
	TopoConfigPath string `mapstructure:"topologyConfigPath"`
	Reconfigure    bool   `mapstructure:"reconfigure"`
}

type SlurmEngine

type SlurmEngine struct{}

func (*SlurmEngine) GenerateOutput

func (eng *SlurmEngine) GenerateOutput(ctx context.Context, tree *topology.Vertex, params map[string]any) ([]byte, *httperr.Error)

func (*SlurmEngine) GetComputeInstances

func (eng *SlurmEngine) GetComputeInstances(ctx context.Context, environment engines.Environment) ([]topology.ComputeInstances, *httperr.Error)

type Topology

type Topology struct {
	Partition  string   `mapstructure:"partition"`
	Plugin     string   `mapstructure:"plugin"`
	BlockSizes []int    `mapstructure:"blockSizes"`
	Nodes      []string `mapstructure:"nodes"`
	Default    bool     `mapstructure:"clusterDefault"`
}

type TopologyNodeFinder

type TopologyNodeFinder struct {
	GetPartitionNodes func(context.Context, string, []any) (string, error)
	Params            []any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL