Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Methods

  • compareSlurmConfig(i: any, a: any, b: any): boolean
  • Return true if the slurm config exceeds the threshold of the slurm ceiling.

    static

    Parameters

    • i: any

      Slurm field that a and b are associated with

    • a: any

      Storage or projected time for this job from the slurm ceiling

    • b: any

      Storage or projected time for this job for this job

    Returns boolean

    • If the slurm config exceeds the threshold of the slurm ceiling
  • getUserSlurmUsage(userId: string, format?: boolean): Promise<{ cpuTime: string; cpus: number; memory: string; memoryUsage: string; nodes: number; walltime: string } | { cpuTime: number; cpus: number; memory: number; memoryUsage: number; nodes: number; walltime: number }>
  • Get the total slurm usage of the indicated user

    static
    async

    Parameters

    • userId: string
    • format: boolean = false

      Whether or not the cputume, memory, memoryusage, and walltime are already formatted

    Returns Promise<{ cpuTime: string; cpus: number; memory: string; memoryUsage: string; nodes: number; walltime: string } | { cpuTime: number; cpus: number; memory: number; memoryUsage: number; nodes: number; walltime: number }>

    • Total slurm usage of the indicated user
  • kbToStorageUnit(i: number): string
  • Turns the passed amount of storage into the most convenient unit.

    static

    Parameters

    • i: number

      Amount of storage in kb

    Returns string

    • Storage in most convenient unit (kb, mb, gb, tb, pb, eb)
  • secondsToTime(seconds: number): string
  • Turns passed seconds time into days-hours:minutes:seconds format

    static

    Parameters

    • seconds: number

      Time in seconds

    Returns string

    time - Passed seconds time converted to days-hours:minutes:seconds format.

  • secondsToTimeDelta(seconds: number): string
  • Turns the passed time into a string specifying each unit

    static

    Parameters

    • seconds: number

      Time in seconds

    Returns string

    • Passed time converted into dayds, hours, minutes, seconds format
  • storageUnitToKB(i: string): number
  • Turns the passed amount of storage into kb

    static

    Parameters

    • i: string

      Amount of storage in original unit

    Returns number

    • Storage in kb
  • timeToSeconds(raw: string): number
  • Turns passed days-hours:minutes:seconds time into seconds format

    static

    Parameters

    • raw: string

      Time in days-hours:minutes:seconds format.

    Returns number

    • Passed days-hours:minutes:seconds time converted to seconds.
  • unitTimeToSeconds(time: number, unit: string): number
  • Turns the passed time into seconds

    static

    Parameters

    • time: number

      Time in specified unit

    • unit: string

      Unit the passed time is in

    Returns number

    • Passed time converted into seconds
  • validateJob(job: Job): Promise<void>
  • Ensure this job has valid input data and slurm config rules

    static
    async
    throws
    • DataFolder must have a valid path, the job must have upload data, and there must be an executable folder in the maintainerConfig

    Parameters

    • job: Job

      This job

    Returns Promise<void>

  • validateParam(job: Job, paramRules: {}): void
  • Ensure the job has all the nessecary input parameters

    static
    throws

    Job must have a complete parameter list

    Parameters

    • job: Job

      This job

    • paramRules: {}

      Parameter rules for this job

      • [keys: string]: any

    Returns void

  • Set the slurm rules for this job, and ensure that those rules don't exceed the default slurm ceiling

    static
    throws
    • Slurm input rules associated with this job must not exceed the default slurm ceiling

    Parameters

    • job: Job

      This job

    • slurmInputRules: slurmInputRules

      Slurm input rules associated with this job

    Returns void

Generated using TypeDoc