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

Validate SRUN variables when launching in SLURM #15011

Merged
merged 21 commits into from
Oct 19, 2022

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Oct 5, 2022

What does this PR do?

Addresses suggestion in #14986, frequent user errors that result in their SLURM jobs hanging. By adding warnings and errors, we can prevent these frequent questions and give feedback directly at runtime.

Fixes #10150

No intended breaking changes:

  • Lightning SLURM users were always meant to use the --ntasks-per-node, otherwise their processes would hang. Hence, the error is appropriate.
  • The warning about srun not being used is very unlikely going to be a false positive, because the srun program is only installed on SLURM clusters. However, we won't make it an error just in case there is another program called srun on your system unrelated to SLURM.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

I made sure I had fun coding 🙃

cc @Borda @awaelchli @carmocca @justusschock

@awaelchli awaelchli added feature Is an improvement or enhancement environment: slurm labels Oct 5, 2022
@awaelchli awaelchli modified the milestones: pl:1.8, pl:future Oct 5, 2022
@awaelchli awaelchli self-assigned this Oct 5, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 17, 2022
@awaelchli awaelchli modified the milestones: future, v1.9 Oct 17, 2022
@awaelchli awaelchli marked this pull request as ready for review October 17, 2022 13:40
@awaelchli awaelchli requested a review from otaj as a code owner October 17, 2022 13:40
@awaelchli awaelchli added the fabric lightning.fabric.Fabric label Oct 17, 2022
@mergify mergify bot added the ready PRs ready to be merged label Oct 18, 2022
@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #15011 (0945cdd) into master (26f632c) will increase coverage by 2%.
The diff coverage is 96%.

❗ Current head 0945cdd differs from pull request most recent head f7a2948. Consider uploading reports for the commit f7a2948 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #15011     +/-   ##
=========================================
+ Coverage      82%      84%     +2%     
=========================================
  Files         412      288    -124     
  Lines       30265    21962   -8303     
=========================================
- Hits        24869    18494   -6375     
+ Misses       5396     3468   -1928     

@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Oct 19, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Oct 19, 2022
@awaelchli awaelchli enabled auto-merge (squash) October 19, 2022 20:58
@awaelchli awaelchli merged commit 576757f into master Oct 19, 2022
@awaelchli awaelchli deleted the feature/slurm-srun-check branch October 19, 2022 21:42
@carmocca carmocca modified the milestones: v1.9, v1.8 Oct 20, 2022
@awaelchli awaelchli mentioned this pull request Oct 20, 2022
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment: slurm fabric lightning.fabric.Fabric feature Is an improvement or enhancement pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate environment variables in SLURMEnvironment and warn user about incompatible settings
4 participants