Oar

treefiles.start_oar(runme_str, logs_dir: Optional[Union[treefiles.tree.Tree, str]] = None, array_fname: Optional[str] = None, wall_time: str = '00:01:00', host: int = 1, core: int = 1, job_name: Optional[str] = None, queue: str = 'default', cmd_fname: Optional[str] = None, runme_args: Optional[List[str]] = None, do_run: bool = True, with_json: bool = False, notify: Optional[List] = None, prgm: str = 'oarsub', stdout: Optional[str] = None, stderr: Optional[str] = None) Union[str, List[str]]

Builds an oar command.

Usage example:

cdir = tf.Tree.new(__file__)
sdir = cdir.dir("OarOut").dump(clean=True)

res = start_oar(
    runme_str=cdir.path("runme.sh"),
    logs_dir=sdir,
    walltime=time(minute=10),
    queue="besteffort",
    core=2,
    cmd_fname=sdir.path("cmd.sh"),
    do_run=True,
)
Parameters
  • runme_str – path to the runme script or command line

  • logs_dir – directory for std out/err

  • array_fname – path to the arguments file (array file)

  • wall_time – wall time of the job

  • host – numbre of nodes

  • core – number of cores

  • job_name – job name

  • queue – job queue [‘default’, ‘besteffort’]

  • cmd_fname – path to a file to save the oar command

  • runme_args – list of command line arguments given to the runme script

  • do_run – whether to execute the command or not

  • with_json – add the -J option in oarsub command

  • notify – notify options [List], you may use the class NotifyOar to build this option

  • prgmoarsub or oarctl sub

  • stdout – path for stdout

  • stderr – path for stderr, defaults to stdout if None

Returns

The output of the oar command if do_run is True else the oar command