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

WISH: Clarify the 'Work dir does not exist' error message #260

Open
HenrikBengtsson opened this issue Apr 9, 2020 · 2 comments
Open

WISH: Clarify the 'Work dir does not exist' error message #260

HenrikBengtsson opened this issue Apr 9, 2020 · 2 comments

Comments

@HenrikBengtsson
Copy link

With future.batchtools and other wrappers, it become a bit tricky to track down where errors are coming from when running in batch mode. For instance, I got some:

Error : BatchtoolsError in BatchtoolsFuture ('future_lapply-1'): 'Work dir does not exist'

I wasn't sure if that was from the scheduler or batchtools, but it turns out it's from here:

# set work dir
if (!fs::dir_exists(jc$work.dir))
return(error("Work dir does not exist"))

Would you mind updating to something like:

error("Working directory (%s) for the batchtools registry does not exist", jc$work.dir)
@HenrikBengtsson
Copy link
Author

Forgot to say, including what the working directory is also helpful in cases where it is set to, say, a local temp folder that is not available on the compute node processing the job.

@HenrikBengtsson
Copy link
Author

Actually, even more informative would be:

error("Working directory (%s) for the batchtools registry does not exist on host %s",
      sQuote(jc$work.dir), sQuote(Sys.info()[["nodename"]]))

Annotating other errors that occur when trying to launch a job in a similar fashion would help troubleshoot failed jobs; it's not always clear when, where, and on which R process these errors take place.

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

1 participant