Documentation ¶
Overview ¶
Package job contains code for accessing compute resources via Slurm.
Package slurm contains code for accessing compute resources via Slurm.
Package job contains code for accessing compute resources via Slurm.
Index ¶
- Variables
- func AllocatableResources(ctx context.Context) corev1.ResourceList
- func CancelJob(args string) (string, error)
- func ConnectionOK() bool
- func GetJobID(pod *corev1.Pod) string
- func HasJobID(pod *corev1.Pod) bool
- func SetContainerStatusID(status *corev1.ContainerStatus, typedValue string)
- func SetPodID(pod *corev1.Pod, idType JobIDType, value string)
- func SubmitJob(scriptFile string) (string, error)
- func TotalResources() corev1.ResourceList
- type JobIDType
- type NodeInfo
- type Stats
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidJob = errors.New("invalid job id")
var ErrRety = errors.New("retry later")
var ExcludeNodes = "--exclude="
ExcludeNodes EXISTS ONLY FOR DEBUGGING PURPOSES of Inotify on NFS.
var NewUserEnv = "--get-user-env=10L"
NewUserEnv is used to generate the /run/user/ folder required by cgroups. The optional mode value control the "su" options. With a mode value of "S", "su" is executed without the "-" option. With a mode value of "L", "su" is executed with the "-" option, replicating the login environment.
var Signal = "--signal=TERM"
var SignalChildren = "--full"
SignalChildren signals the submission script and the pause environment. SignalChildren signals the batch script and its children processes (pause).
var SignalParentOnly = "--batch"
SignalParentOnly signals only the submission script. https://slurm.schedmd.com/scancel.html#OPT_batch
var Slurm struct { SubmitCmd string CancelCmd string StatsCmd string }
Slurm represents a SLURM installation.
Functions ¶
func AllocatableResources ¶ added in v0.1.2
func AllocatableResources(ctx context.Context) corev1.ResourceList
func ConnectionOK ¶ added in v0.1.2
func ConnectionOK() bool
ConnectionOK return true if HPK maintains connection with the Slurm manager. Otherwise, it returns false.
func SetContainerStatusID ¶ added in v0.1.2
func SetContainerStatusID(status *corev1.ContainerStatus, typedValue string)
func TotalResources ¶ added in v0.1.2
func TotalResources() corev1.ResourceList
Types ¶
type NodeInfo ¶ added in v0.1.2
type NodeInfo struct { Architecture string `json:"architecture"` KernelVersion string `json:"operating_system"` Name string `json:"name"` CPUs uint64 `json:"cpus"` CPUCores uint64 `json:"cores"` EphemeralStorage uint64 `json:"temporary_disk"` // FreeMemory ... reported in MegaBytes //[TODO: temporarily changed it to int64 due to sometimes slurm declares freememory as "-2"] FreeMemory int64 `json:"free_memory"` Partitions []string `json:"partitions"` }
func (NodeInfo) ResourceList ¶ added in v0.1.2
func (i NodeInfo) ResourceList() corev1.ResourceList
ResourceList converts the Slurm-reported stats into Kubernetes-Stats.