apps.crc_interactive

A simple wrapper around the Slurm srun command.

The application launches users into an interactive Slurm session on a user-selected cluster and (if specified) partition. Dedicated command line options for selecting specific clusters.

Each cluster is provided with predefined command line options. As a result, this application does support dynamic cluster discovery. New clusters need to be manually added (or removed) by updating the application CLI arguments.

Module Contents

class CrcInteractive

Bases: apps.utils.cli.BaseParser

Launch an interactive Slurm session.

min_mpi_nodes = 2
min_mpi_cores
min_time = 1
max_time = 12
default_time
default_nodes = 1
default_cores = 1
default_mpi_cores = 28
default_mem = 1
default_gpus = 0
clusters
cluster_args
resource_args
additional_args
static parse_time(time_str: str) datetime.time

Parse a string representation of time in ‘HH:MM:SS’ format and return a time object.

Parameters:

time_str – A string representing time in ‘HH:MM:SS’ format.

Returns:

A time object representing the parsed time.

Return type:

time

Raises:

ArgumentTypeError – If the input string is not in the correct format or cannot be parsed.

parse_args(args=None, namespace=None) argparse.Namespace

Parse command line arguments.

create_srun_command(args: argparse.Namespace) str

Create an srun command based on parsed command line arguments.

Parameters:

args – A dictionary of parsed command line parsed_args.

Returns:

The equivalent srun command as a string.

app_logic(args: argparse.Namespace) None

Logic to evaluate when executing the application.

Parameters:

args – Parsed command line arguments.