Open nickjer opened 8 years ago
Probably something along the lines of adding a submit_args
attribute to a job:
class OSC::Machete::Job
attr_reader :submit_args
...
def submit
...
Dir.chdir(path.to_s) do
@pbsid = @torque.qsub script_name, depends_on: dependency_ids, host: @host, account_string: account_string, submit_args: submit_args
end
end
end
and then modify the TorqueHelper
as such:
class OSC::Machete::TorqueHelper
def qsub(script, host: nil, depends_on: {}, account_string: nil, submit_args: {})
...
# Create PBS submission attributes
headers = headers.merge submit_args.fetch(:headers, {})
resources = submit_args.fetch(:resources, {})
envvars = submit_args.fetch(:envvars, {})
pbs_job.submit(file: script, headers: headers, resources: resources, envvars: envvars, qsub: true).id
end
end
I'd like to be able to pass in headers, resources, and env vars to the
qsub
function programmatically for each job. This is already a feature with PBS headers in a script file:but not currently allowed through the machete interface programmatically. This is necessary for
osc-vnc
to work.