示例#1
0
def spool_file(name):
    """
    Form a path to the PBS spool directory with name as the last element.

    :param name: energy file name in format <jobid>.energy.
    :type name: str
    :returns: path to RUR/energy file in format PBS_HOME/spool/<jobid>.energy.
    """
    home = _pbs_conf("PBS_HOME")
    if home is None:
        raise BackendError("PBS_HOME not found")
    return os.path.join(home, "spool", name)
示例#2
0
def spool_file(name):
    """
    Form a path to the PBS spool directory with name as the last element.

    :param name: energy file name in format <jobid>.energy.
    :type name: str
    :returns: path to RUR/energy file in format PBS_HOME/spool/<jobid>.energy.
    """
    home = _pbs_conf("PBS_HOME")
    if home is None:
        raise BackendError("PBS_HOME not found")
    return os.path.join(home, "spool", name)
示例#3
0
"""
__doc__ = """
This module is used for Cray systems.
"""

import os
import stat
import time
import random
from subprocess import Popen, PIPE
from pbs.v1._pmi_types import BackendError
import pbs
from pbs.v1._pmi_utils import _running_excl, _pbs_conf, _get_vnode_names, \
    _svr_vnode

pbsexec = _pbs_conf("PBS_EXEC")
if pbsexec is None:
    raise BackendError("PBS_EXEC not found")


def launch(jid, args):
    """
    Run capmc and return the structured output.

    :param jid: job id
    :type jid: str
    :param args: arguments for capmc command
    :type args: str
    :returns: capmc output in json format.
    """
    import json
示例#4
0
# "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
# trademark licensing policies.
 *
 */
"""
__doc__ = """
This module is used for SGI systems.
"""

import pbs
import os
import sys
from pbs.v1._pmi_types import BackendError
from pbs.v1._pmi_utils import _pbs_conf, _get_hosts

pbsexec = _pbs_conf("PBS_EXEC")
if pbsexec is None:
    raise BackendError("PBS_EXEC not found")

sys.path.append(os.path.join(pbsexec, "python", "lib", "python2.7"))
sys.path.append(os.path.join(pbsexec, "python", "lib", "python2.7",
                "lib-dynload"))
import encodings


# Plug in the path for the SGI power API.
sys.path.append("/opt/sgi/ta")
import sgi_power_api as api


class Pmi: