jm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NativeID is the value set to JM.ID when mpirun shall be used to submit a job
	NativeID = "native"

	// SlurmID is the value set to JM.ID when Slurm shall be used to submit a job
	SlurmID = "slurm"

	// PrunID is the value set to JM.ID when prun shall be used to submit a job
	PrunID = "prun"
)

Variables

This section is empty.

Functions

func Load

func Load(jm *JM) error

Load is the function to use to load the JM component

func NativeGetConfig

func NativeGetConfig() error

NativeGetConfig gets the configuration of the native job manager

func NativeGetError

func NativeGetError(j *job.Job, sysCfg *sys.Config) string

NativeGetError retrieves the error messages from an application after the completion of a job

func NativeGetOutput

func NativeGetOutput(j *job.Job, sysCfg *sys.Config) string

NativeGetOutput retrieves the application's output after the completion of a job

func NativeSetConfig

func NativeSetConfig() error

NativeSetConfig sets the configuration of the native job manager

func NativeSubmit

func NativeSubmit(j *job.Job, env *buildenv.Info, sysCfg *sys.Config) (syexec.SyCmd, error)

NativeSubmit is the function to call to submit a job through the native job manager

func PrunGetConfig

func PrunGetConfig() error

PrunGetConfig gets the configuration of the native job manager

func PrunGetError

func PrunGetError(j *job.Job, sysCfg *sys.Config) string

PrunGetError retrieves the error messages from an application after the completion of a job

func PrunGetOutput

func PrunGetOutput(j *job.Job, sysCfg *sys.Config) string

PrunGetOutput retrieves the application's output after the completion of a job

func PrunSetConfig

func PrunSetConfig() error

PrunSetConfig sets the configuration of the native job manager

func PrunSubmit

func PrunSubmit(j *job.Job, env *buildenv.Info, sysCfg *sys.Config) (syexec.SyCmd, error)

PrunSubmit is the function to call to submit a job through the native job manager

func SlurmGetConfig

func SlurmGetConfig() error

SlurmGetConfig is the Slurm function to get the configuration of the job manager

func SlurmGetError

func SlurmGetError(j *job.Job, sysCfg *sys.Config) string

SlurmGetError reads the content of the Slurm error file that is associated to a job

func SlurmGetOutput

func SlurmGetOutput(j *job.Job, sysCfg *sys.Config) string

SlurmGetOutput reads the content of the Slurm output file that is associated to a job

func SlurmLoad

func SlurmLoad(jm *JM, sysCfg *sys.Config) error

SlurmLoad is the function called when trying to load a JM module

func SlurmSetConfig

func SlurmSetConfig() error

SlurmSetConfig is the Slurm function to set the configuration of the job manager

func SlurmSubmit

func SlurmSubmit(j *job.Job, hostBuildEnv *buildenv.Info, sysCfg *sys.Config) (syexec.SyCmd, error)

SlurmSubmit prepares the batch script necessary to start a given job.

Note that a script does not need any specific environment to be submitted

func TempFile

func TempFile(j *job.Job, env *buildenv.Info, sysCfg *sys.Config) error

TempFile creates a temporary file that is used to store a batch script

Types

type GetConfigFn

type GetConfigFn func() error

GetConfigFn is a "function pointer" that lets us get the configuration of a given job manager

type JM

type JM struct {
	// ID identifies which job manager has been detected on the system
	ID string

	// Set is the function that sets the configuration of the current job manager
	Set SetConfigFn

	// Get is the function that gets the configuration of the current job manager
	Get GetConfigFn

	Load LoadFn

	// Submit is the function to submit a job through the current job manager
	Submit SubmitFn
}

JM is the structure representing a specific JM

func Detect

func Detect() JM

Detect figures out which job manager must be used on the system and return a structure that gather all the data necessary to interact with it

func NativeDetect

func NativeDetect() (bool, JM)

NativeDetect is the function used by our job management framework to figure out if mpirun should be used directly. The native component is the default job manager. If application, the function returns a structure with all the "function pointers" to correctly use the native job manager.

func PrunDetect

func PrunDetect() (bool, JM)

PrunDetect is the function used by our job management framework to figure out if mpirun should be used directly. The native component is the default job manager. If application, the function returns a structure with all the "function pointers" to correctly use the native job manager.

func SlurmDetect

func SlurmDetect() (bool, JM)

LoadSlurm is the function used by our job management framework to figure out if Slurm can be used and if so return a JM structure with all the "function pointers" to interact with Slurm through our generic API.

type LoadFn

type LoadFn func(*JM, *sys.Config) error

LoadFn loads a specific job manager once detected

type Loader

type Loader interface {
	Load() bool
}

Loader checks whether a giv job manager is applicable or not

type Native

type Native struct {
}

Native is the structure representing the native job manager (i.e., directly use mpirun)

type Prun

type Prun struct {
}

Prun is the structure representing the native job manager (i.e., directly use mpirun)

type SetConfigFn

type SetConfigFn func() error

SetConfigFn is a "function pointer" that lets us store the configuration of a given job manager

type SubmitFn

type SubmitFn func(*job.Job, *buildenv.Info, *sys.Config) (syexec.SyCmd, error)

SubmitFn is a "function pointer" that lets us job a new job

Jump to

Keyboard shortcuts

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