def set_nprocs(self, parameters): """ Set the nprocs option in the run command """ line = self.lines[self.run_cmd_line_id] args = update_command_single_value(separate_args(line), ('--nprocs', '--nprocs=', '-n'), enquote_arg(parameters)) self.lines[self.run_cmd_line_id] = assemble_args(args)
def set_coupling(self, coupling): """ Set the coupling option in the run command """ line = self.lines[self.run_cmd_line_id] args = update_command_single_value(separate_args(line), ('--coupling',), enquote_arg(coupling)) self.lines[self.run_cmd_line_id] = assemble_args(args)
def set_run_id(self, run_id=None, run_id_prefix=None, run_id_suffix=None): """ Set the run id, id_prefix, and id_suffix options in the run command """ line = self.lines[self.run_cmd_line_id] args = separate_args(line) if run_id != None: args = update_command_single_value(args, ('--id', '--id='), enquote_arg(run_id)) if run_id_prefix != None: args = update_command_single_value(args, ('--id-prefix', '--id-prefix='), enquote_arg(run_id_prefix)) if run_id_suffix != None: args = update_command_single_value(args, ('--id-suffix', '--id-suffix='), enquote_arg(run_id_suffix)) self.lines[self.run_cmd_line_id] = assemble_args(args)
def set_compute_build(self, parameters): """ Set the compute-build option in the run command """ line = self.lines[self.run_cmd_line_id] args = update_command_single_value( separate_args(line), ('--compute-build', '--compute-build='), enquote_arg(parameters)) self.lines[self.run_cmd_line_id] = assemble_args(args)
def set_nthreads(self, parameters): """ Set the nthreads option in the run command """ line = self.lines[self.run_cmd_line_id] args = update_command_single_value( separate_args(line), ('--threads-per-task', '--threads-per-task=', '-nt'), enquote_arg(parameters)) self.lines[self.run_cmd_line_id] = assemble_args(args)