Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u #1

Merged
merged 3 commits into from
Mar 26, 2024
Merged

u #1

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions dpdispatcher/machines/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,11 @@ def gen_script_header(self, job):
f"#$ -q {resources.queue_name}"
)

if (
resources["strategy"].get("customized_script_header_template_file")
is not None
):
sge_script_header = customized_script_header_template(
resources["strategy"]["customized_script_header_template_file"],
resources,
)

if (resources["strategy"].get("customized_script_header_template_file")
is not None):
filename = resources["strategy"]["customized_script_header_template_file"]
sge_script_header = customized_script_header_template(filename, resources)
else:
sge_script_header = sge_script_header_template.format(
**sge_script_header_dict
Expand All @@ -238,12 +235,11 @@ def gen_script_header(self, job):
def do_submit(self, job):
script_file_name = job.script_file_name
script_str = self.gen_script(job)
script_str = script_str.replace(
f"source $REMOTE_ROOT/{job.script_file_name}.run",
f"source $REMOTE_ROOT/{job.script_file_name}",
)
job_id_name = job.job_hash + "_job_id"
self.context.write_file(fname=script_file_name, write_str=script_str)
script_run_str = self.gen_script_command(job)
script_run_file_name = f"{job.script_file_name}.run"
self.context.write_file(fname=script_run_file_name, write_str=script_run_str)
script_file_dir = self.context.remote_root
stdin, stdout, stderr = self.context.block_checkcall(
"cd {} && {} {}".format(script_file_dir, "qsub", script_file_name)
Expand Down