Repository navigation
Allow test cases to run on login nodes - #538
Conversation
TestingI ran tests in all 3 parallel systems:
In addition, I verified that trying to run the QU240 |
a965771 to
3104105
Compare
|
@matthewhoffman, this is ready for you to try out (and to use in #488 if you like). You would need to set |
|
@xylar , thanks for taking care of this. I'll test it out next time I test or set up an ensemble. |
|
No that wouldn't work in the current implementation. The config options have to be the same for all steps in a test case. But one option might be to use the command line flag in that particular situation. I'll have to think about a way to include that in the step itself. |
3104105 to
30a2e4e
Compare
30a2e4e to
642505d
Compare
|
@matthewhoffman, I think this solution will be much messier to review but much better to use. Essentially, you don't have to do anything different now for a step (or even a test case or a suite) to run on a login node. It just has to be made up of steps that don't use MPI and don't use more than I haven't had a chance to test this yet so hold off on doing anything but responding to the concept until I have a chance. |
642505d to
5e4c98a
Compare
This merge changes `run.serial` and `parallel` so we only poll for slrum resources once and use that information for all test cases and steps. This merge also removes the error message when you run on a login node. Instead, a login node is allocated a small number of cores (4 by default) and isn't allowed to run MPI jobs (it only supports one task). To accommodate this, the `Step.constrain_resources()` method takes a dictionary of available resources instead of just the number of available cores.
This also requires some pre-commit clean up
5e4c98a to
c8172ea
Compare
|
@matthewhoffman, okay, I tested this to my satisfaction. Have a look and tell me what you think. If you have something to test on, give it a whirl! |
|
I used this when testing #488 on Perlmutter, and I was able to use |
matthewhoffman
left a comment
There was a problem hiding this comment.
@xylar , thanks for reworking the solution for this issue. I tested this PR merged into my ensemble branch and it worked like a charm. I made a cursory review of the parts of the code changes that I understood. I'm approving now because my comment is minor.
| partition_executable = gpmetis | ||
|
|
||
| # the number of cores a user can use on a login node | ||
| login_cores = 4 |
There was a problem hiding this comment.
Is it allowable to have this be more than 1 at most centers?
There was a problem hiding this comment.
Yes, this is thread parallelism and we're often allowed to use a few cores (e.g. you can compile code in parallel)
| nodes = _get_subprocess_int(args) | ||
| cores = cores_per_node * nodes | ||
| mpi_allowed = True | ||
| elif parallel_system == 'login': |
There was a problem hiding this comment.
I like this solution - defining a different system for a login node seems like it would provide the flexibility needed to handle the situation properly.
|
Thanks @matthewhoffman for your review and @trhille for trying it out, too! |
If you are on a slurm system but a slurm job is not detected, you are assumed to be on a login node. In that case, it is like being on a single node system, restricted to a small number of cores (set with the config option
login_cores = 4in the[parallel]config section). In addition, you are not allowed to run MPI jobs (steps withntasks> 1).This is enforced by modifying the
Step.constrain_resources()method, which now takes a dictionary ofavailable_resourcesrather than a singleavailable_coresargument. (Many tasks have their overriddenconstrain_resources()method changed as a result.)The new, stricter linter required cleaning up some code in the process.
Checklist
Testingin this PR) any testing that was used to verify the changescloses #495