JDL Submission Modules

This module is located in GRID_LRT.application. It can create and submit a jdl file, linking it with a CouchDB design document (i.e. token ‘type’)

GRID_LRT.application.submit

This module creates the launch scripts for the WMS on gina Options include the number of cores and the queue type.

class GRID_LRT.application.submit.JdlLauncher(numjobs=1, token_type='t_test', parameter_step=4, **kwargs)[source]

Bases: object

jdl_launcher creates a jdl launch file with the appropriate queue, CPUs, cores and Memory per node

The jdl file is stored in a temporary location and can be automatically removed using a context manager such as: >>> with Jdl_launcher_object as j:

launch_ID=j.launch()

This will launch the jdl, remove the temp file and reutrn the Job_ID for the glite job.

__init__(numjobs=1, token_type='t_test', parameter_step=4, **kwargs)[source]

The jdl_launcher class is initialized with the number of jobs, the name of the PiCaS token type to run, and a flag to use the whole node.

Args:

numjobs (int): The number of jobs to launch on the cluster token_type (str): The name of the token_type to launch from the

PiCaS database. this uses the get_picas_credentials module to get the PiCaS database name, uname, passw

wholenodes(Boolean): Whether to reserve the entire node. Default is F NCPU (int, optional): Number of CPUs to use for each job. Default is 1

build_jdl_file(database=None)[source]

Uses a template to build the jdl file and place it in a temporary file object stored internally.

launch(database=None)[source]

Launch the glite-job and return the job identification

make_temp_jdlfile(database=None)[source]

Makes a temporary file to store the JDL document that is only visible to the user

class GRID_LRT.application.submit.LouiLauncher(*args, **kwargs)[source]

Bases: GRID_LRT.application.submit.JdlLauncher

To make integration tests of an AGLOW step, this job launches it on loui.

__init__(*args, **kwargs)[source]

The jdl_launcher class is initialized with the number of jobs, the name of the PiCaS token type to run, and a flag to use the whole node.

Args:

numjobs (int): The number of jobs to launch on the cluster token_type (str): The name of the token_type to launch from the

PiCaS database. this uses the get_picas_credentials module to get the PiCaS database name, uname, passw

wholenodes(Boolean): Whether to reserve the entire node. Default is F NCPU (int, optional): Number of CPUs to use for each job. Default is 1

build_jdl_file(database=None)

Uses a template to build the jdl file and place it in a temporary file object stored internally.

cleanup()[source]
launch(database=None)[source]

Launch the glite-job and return the job identification

make_temp_jdlfile(database=None)

Makes a temporary file to store the JDL document that is only visible to the user

class GRID_LRT.application.submit.RunningJob(glite_url='')[source]

Bases: object

__init__(glite_url='')[source]

x.__init__(…) initializes x; see help(type(x)) for signature

count_successes(jobs)[source]

Counts the number of Completed jobs in the results of the glite-wms-job-status output.

status
class GRID_LRT.application.submit.UnauthorizedJdlLauncher(*args, **kw)[source]

Bases: GRID_LRT.application.submit.JdlLauncher

__init__(*args, **kw)[source]

The jdl_launcher class is initialized with the number of jobs, the name of the PiCaS token type to run, and a flag to use the whole node.

Args:

numjobs (int): The number of jobs to launch on the cluster token_type (str): The name of the token_type to launch from the

PiCaS database. this uses the get_picas_credentials module to get the PiCaS database name, uname, passw

wholenodes(Boolean): Whether to reserve the entire node. Default is F NCPU (int, optional): Number of CPUs to use for each job. Default is 1

build_jdl_file(database=None)

Uses a template to build the jdl file and place it in a temporary file object stored internally.

launch()[source]

Launch the glite-job and return the job identification

make_temp_jdlfile(database=None)

Makes a temporary file to store the JDL document that is only visible to the user

class GRID_LRT.application.submit.gridjob(wholenodes=False, NCPU=1, token_type=None)[source]

Bases: object

A class containing all required descriptions for a SINGLE Grid job, as well as its parameters

__init__(wholenodes=False, NCPU=1, token_type=None)[source]

x.__init__(…) initializes x; see help(type(x)) for signature