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

Jobs waiting in queue will produce an error in get_job_status #72

Closed
LizaDarrous opened this issue Sep 7, 2021 · 3 comments
Closed

Comments

@LizaDarrous
Copy link

If I've launched jobs using rslurm and they're stuck in queue due to resources and haven't yet launched, the first part of the get_job_status will return a FALSE in 'completed' status, but the next part that collects the log files will produce an error specifically for the following snippet:
logs <- vapply(out_files, function(outf) paste(readLines(outf), collapse = "\n"), "")
, with Error message
Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open file '_rslurm_PABMI_optim/slurm_0.out': No such file or directory

Is it possible to remove the log file retrieval, or only print it if $completed == TRUE?

@qdread
Copy link
Contributor

qdread commented Sep 7, 2021

Thanks for bringing this to our attention. It seems like a reasonably easy thing to fix so I should be able to resolve this issue for you. In the meantime, if you have a potential solution, please feel free to submit a pull request! 😁

@qdread
Copy link
Contributor

qdread commented Sep 7, 2021

I think commit 53b5d40 resolves this. Now get_job_status first checks which log files exist, then reads only those files. If none exist yet, the logs object will be empty in the output. I'm closing this issue but please let us know if there is still a problem.

@qdread qdread closed this as completed Sep 7, 2021
@LizaDarrous
Copy link
Author

Thank you for the quick update!

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

No branches or pull requests

2 participants