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

Write output from submission to file on error #124

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Apr 21, 2022

This may happen if the queuing system e.g. refused to schedule a run
because of errors in the submission script.

This came up for me because I asked for too much memory by mistake. It might be worthwhile to add a memory_max option to the queue yaml.

I have not checked the other adapters in detail, but it seems at least the RemoteQueueAdapter seems to suffer the same problem.

This may happen if the queuing system e.g. refused to schedule a run
because of errors in the submission script
@pmrv pmrv requested a review from jan-janssen April 21, 2022 09:18
@@ -422,7 +422,9 @@ def _execute_command(
universal_newlines=True,
shell=not isinstance(commands, list),
)
except subprocess.CalledProcessError:
except subprocess.CalledProcessError as e:
with open(os.path.join(working_directory, "pysqa.err"), "w") as f:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be a write or an append? And should we name the file pysqa.log instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption was that in each directory pysqa only submits one job. If that's not true we should probably use propper logging. I have no opinion on the filename though, I can change that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, you are right - the file should only be written once. And naming the file pysqa.err is also fine for me.

Copy link
Member

@jan-janssen jan-janssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@jan-janssen jan-janssen merged commit fb1b0d2 into master Oct 13, 2022
@delete-merged-branch delete-merged-branch bot deleted the queue-err branch October 13, 2022 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants