csdms

wmtexe.launcher module

Classes to configure and launch jobs from a wmt-exe environment.

class wmtexe.launcher.BashLauncher(sim_id)[source]

Bases: wmtexe.launcher.Launcher

WMT job launcher for a bash environment.

Methods

after_launch(**kwds) Perform actions after launching job.
after_success(**kwds) Perform actions after job completes.
before_launch(**kwds) Perform actions before launching job.
launch(**kwds) Launch job with launch command.
launch_command(**kwds) Path to launch script.
run(**kwds) Perform job setup, launch, and teardown actions.
script(**kwds) Generate the launch script.
slave_command([extra_args]) Create the wmt-slave command.
class wmtexe.launcher.Launcher(sim_id)[source]

Bases: object

Job launcher for a wmt-exe environment.

Parameters:

sim_id : str

A unique UUID for the job.

Attributes

launch_dir (str) The working directory from which the job is started.
script_path (str) Path to launch script.
sim_id (str) A unique UUID for the job.

Methods

after_launch(**kwds) Perform actions after launching job.
after_success(**kwds) Perform actions after job completes.
before_launch(**kwds) Perform actions before launching job.
launch(**kwds) Launch job with launch command.
launch_command(**kwds) Path to launch script.
run(**kwds) Perform job setup, launch, and teardown actions.
script(**kwds) Generate the launch script.
slave_command([extra_args]) Create the wmt-slave command.
after_launch(**kwds)[source]

Perform actions after launching job.

Parameters:

**kwds

Arbitrary keyword arguments.

after_success(**kwds)[source]

Perform actions after job completes.

Parameters:

**kwds

Arbitrary keyword arguments.

before_launch(**kwds)[source]

Perform actions before launching job.

Parameters:

**kwds

Arbitrary keyword arguments.

launch(**kwds)[source]

Launch job with launch command.

Parameters:

**kwds

Arbitrary keyword arguments.

launch_command(**kwds)[source]

Path to launch script.

Parameters:

**kwds

Arbitrary keyword arguments.

Returns:

str

The launch command to execute.

launch_dir = '~/.wmt'
run(**kwds)[source]

Perform job setup, launch, and teardown actions.

Parameters:

**kwds

Arbitrary keyword arguments.

script(**kwds)[source]

Generate the launch script.

Parameters:

*kwds

Arbitrary keyword arguments.

Returns:

str

The launch script to be written to a file.

slave_command(extra_args=None)[source]

Create the wmt-slave command.

Parameters:

extra_args : str, optional

Additional arguments.

Returns:

str

The slave command to execute.

class wmtexe.launcher.QsubLauncher(sim_id)[source]

Bases: wmtexe.launcher.Launcher

WMT job launcher for a PBS scheduler.

Methods

after_launch(**kwds) Perform actions after launching job.
after_success(**kwds) Perform actions after job completes.
before_launch(**kwds) Perform actions before launching job.
launch(**kwds) Launch job with launch command.
launch_command(**kwds) Path to launch script.
run(**kwds) Perform job setup, launch, and teardown actions.
script(**kwds) Generate the launch script.
slave_command([extra_args]) Create the wmt-slave command.
launch_command(**kwds)[source]

Path to launch script.

Parameters:

**kwds

Arbitrary keyword arguments.

Returns:

str

The launch command to execute.