Beispiel #1
0
    match = CONDOR_JOBID_EXTRACT_REGEX().search(output)

    if not match:
        raise errors.ExtractionError, "Unexpected response from Condor: %r" % output

    return match.group(1)


def slurm_jobid_extract(output):

    match = SLURM_JOBID_EXTRACT_REGEX().search(output)

    if not match:
        raise errors.ExtractionError, "Unexpected response from Slurm: %r" % output

    return match.group(1)


# Regex caching
from libtbx.queuing_system_utils.processing import util

LSF_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
    pattern=r"Job <(\d+)> is submitted", )

CONDOR_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
    pattern=r"\d+ job\(s\) submitted to cluster (\d+)\.", )

SLURM_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
    pattern=r"Submitted batch job (\d+)")
Beispiel #2
0
from __future__ import division

import subprocess
import time

from libtbx.queuing_system_utils.processing import util

# These are not very efficient
SGE_REGEX = util.get_lazy_initialized_regex( pattern = r"Following jobs do not exist" )


def sge_single_evaluate(out, err):
  "Evaluates SGE text output in single mode"

  if err:
    if SGE_REGEX().search( err ):
      return True

    else:
      raise RuntimeError, "SGE error:\n%s" % err

  else:
    return False


def lsf_single_evaluate(out, err):
  "Evaluates LSF text output in single mode"

  if err:
    return True
Beispiel #3
0
from __future__ import absolute_import, division, print_function

import subprocess
import time

from libtbx.queuing_system_utils.processing import util
from libtbx.queuing_system_utils.processing import errors

# These are not very efficient
SGE_REGEX = util.get_lazy_initialized_regex( pattern = r"Following jobs do not exist" )


def sge_single_evaluate(out, err):
  "Evaluates SGE text output in single mode"

  if err:
    if SGE_REGEX().search( err ):
      return True

    else:
      raise errors.AbnormalExitError("SGE error:\n%s" % err)

  else:
    return False


def lsf_single_evaluate(out, err):
  "Evaluates LSF text output in single mode"

  if err:
    return True
Beispiel #4
0
  if not match:
    raise RuntimeError, "Unexpected response from queuing system"

  return match.group(1)


def slurm_jobid_extract(output):

  match = SLURM_JOBID_EXTRACT_REGEX().search( output )

  if not match:
    raise RuntimeError, "Unexpected response from queuing system"

  return match.group(1)


# Regex caching
from libtbx.queuing_system_utils.processing import util

LSF_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
  pattern = r"Job <(\d+)> is submitted",
  )

CONDOR_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
  pattern = r"\d+ job\(s\) submitted to cluster (\d+)\.",
  )

SLURM_JOBID_EXTRACT_REGEX = util.get_lazy_initialized_regex(
  pattern = r"Submitted batch job (\d+)"
  )