def run_command(shell_script, python_path, script_dir, params): params_str = parse.to_str(params) slurm_command = 'sbatch {0} {1} {2} "{3}"'.format(shell_script, python_path, script_dir, params_str) print(slurm_command) os.system(slurm_command)
def run_command(shell_script, python_path, script_dir, params): """ Function to submit jobs on a slurm system Args: shell_script: Name of shell script to run python_path: Path to python version script_dir: Directory where script lives params: parameters in dictionary format Returns: None """ params_str = parse.to_str(params) slurm_command = 'sbatch {0} {1} {2} "{3}"'.format(shell_script, python_path, script_dir, params_str) print(slurm_command) os.system(slurm_command)