Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hyperion.Slurm.Sbatch
Synopsis
- data SbatchError = SbatchError {}
- data SbatchOptions = SbatchOptions {}
- defaultSbatchOptions :: SbatchOptions
- sBatchOptionString :: SbatchOptions -> String
- sbatchOutputParser :: Parser JobId
- sbatchScript :: SbatchOptions -> String -> IO JobId
- formatRuntime :: NominalDiffTime -> String
- sbatchCommand :: SbatchOptions -> FilePath -> [Text] -> IO JobId
Documentation
data SbatchError Source #
Error from running sbatch
. The String
s are the contents of stdout
and stderr
from sbatch
.
Constructors
SbatchError | |
Instances
Show SbatchError Source # | |
Defined in Hyperion.Slurm.Sbatch Methods showsPrec :: Int -> SbatchError -> ShowS # show :: SbatchError -> String # showList :: [SbatchError] -> ShowS # | |
Exception SbatchError Source # | |
Defined in Hyperion.Slurm.Sbatch Methods toException :: SbatchError -> SomeException # fromException :: SomeException -> Maybe SbatchError # displayException :: SbatchError -> String # |
data SbatchOptions Source #
Type representing possible options for sbatch
. Map 1-to-1 to sbatch
options, so see man sbatch
for details.
Constructors
SbatchOptions | |
Fields
|
Instances
Show SbatchOptions Source # | |
Defined in Hyperion.Slurm.Sbatch Methods showsPrec :: Int -> SbatchOptions -> ShowS # show :: SbatchOptions -> String # showList :: [SbatchOptions] -> ShowS # |
defaultSbatchOptions :: SbatchOptions Source #
Default SbatchOptions
. Request 1 task on 1 node for 24 hrs, everything else
unspecified.
sBatchOptionString :: SbatchOptions -> String Source #
Convert SbatchOptions
to a string of options for sbatch
sbatchScript :: SbatchOptions -> String -> IO JobId Source #
Runs sbatch
on a batch file with options pulled from SbatchOptions
and
script given as the String
input parameter. If sbatch
exists with failure
then throws SbatchError
.
formatRuntime :: NominalDiffTime -> String Source #
Formats NominalDiffTime
into hh:mm:ss
.
sbatchCommand :: SbatchOptions -> FilePath -> [Text] -> IO JobId Source #
Runs the command given by FilePath
with arguments [
in
Text
]sbatch
script via sbatchScript
. If sbatch
fails then throws
SbatchError
.