toil.batchSystems.lsfHelper

Attributes

LSB_PARAMS_FILENAME

LSF_CONF_FILENAME

LSF_CONF_ENV

DEFAULT_LSF_UNITS

DEFAULT_RESOURCE_UNITS

LSF_JSON_OUTPUT_MIN_VERSION

logger

Functions

find(basedir, string)

walk basedir and return all files matching string

find_first_match(basedir, string)

return the first file that matches string starting from basedir

get_conf_file(filename, env)

apply_conf_file(fn, conf_filename)

per_core_reserve_from_stream(stream)

get_lsf_units_from_stream(stream)

tokenize_conf_stream(conf_handle)

convert the key=val pairs in a LSF config stream to tuples of tokens

apply_bparams(fn)

apply fn to each line of bparams, returning the result

apply_lsadmin(fn)

apply fn to each line of lsadmin, returning the result

get_lsf_units([resource])

check if we can find LSF_UNITS_FOR_LIMITS in lsadmin and lsf.conf

parse_mem_and_cmd_from_output(output)

Use regex to find "MAX MEM" and "Command" inside of an output.

get_lsf_version()

Get current LSF version

check_lsf_json_output_supported()

Check if the current LSF system supports bjobs json output.

parse_memory(mem)

Parse memory parameter.

per_core_reservation()

returns True if the cluster is configured for reservations to be per core,

Module Contents

toil.batchSystems.lsfHelper.LSB_PARAMS_FILENAME = 'lsb.params'
toil.batchSystems.lsfHelper.LSF_CONF_FILENAME = 'lsf.conf'
toil.batchSystems.lsfHelper.LSF_CONF_ENV = ['LSF_CONFDIR', 'LSF_ENVDIR']
toil.batchSystems.lsfHelper.DEFAULT_LSF_UNITS = 'KB'
toil.batchSystems.lsfHelper.DEFAULT_RESOURCE_UNITS = 'MB'
toil.batchSystems.lsfHelper.LSF_JSON_OUTPUT_MIN_VERSION = '10.1.0.2'
toil.batchSystems.lsfHelper.logger
toil.batchSystems.lsfHelper.find(basedir, string)[source]

walk basedir and return all files matching string

toil.batchSystems.lsfHelper.find_first_match(basedir, string)[source]

return the first file that matches string starting from basedir

toil.batchSystems.lsfHelper.get_conf_file(filename, env)[source]
toil.batchSystems.lsfHelper.apply_conf_file(fn, conf_filename)[source]
toil.batchSystems.lsfHelper.per_core_reserve_from_stream(stream)[source]
toil.batchSystems.lsfHelper.get_lsf_units_from_stream(stream)[source]
toil.batchSystems.lsfHelper.tokenize_conf_stream(conf_handle)[source]

convert the key=val pairs in a LSF config stream to tuples of tokens

toil.batchSystems.lsfHelper.apply_bparams(fn)[source]

apply fn to each line of bparams, returning the result

toil.batchSystems.lsfHelper.apply_lsadmin(fn)[source]

apply fn to each line of lsadmin, returning the result

toil.batchSystems.lsfHelper.get_lsf_units(resource=False)[source]

check if we can find LSF_UNITS_FOR_LIMITS in lsadmin and lsf.conf files, preferring the value in bparams, then lsadmin, then the lsf.conf file

Parameters:

resource (bool)

Return type:

str

toil.batchSystems.lsfHelper.parse_mem_and_cmd_from_output(output)[source]

Use regex to find “MAX MEM” and “Command” inside of an output.

Parameters:

output (str)

toil.batchSystems.lsfHelper.get_lsf_version()[source]

Get current LSF version

toil.batchSystems.lsfHelper.check_lsf_json_output_supported()[source]

Check if the current LSF system supports bjobs json output.

toil.batchSystems.lsfHelper.parse_memory(mem)[source]

Parse memory parameter.

Parameters:

mem (float)

Return type:

str

toil.batchSystems.lsfHelper.per_core_reservation()[source]

returns True if the cluster is configured for reservations to be per core, False if it is per job