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

hydra/mpiexec: detect missing executables #6568

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Jun 22, 2023

Pull Request Description

If the user invokes mpiexec without executables, currently it will segfault. Check for this case and provider proper error messages.

Fixes #6563 - mpirun

Related: #6520 - mpirun -n 2
EDIT: also #5598 - mpirun -n
[skip warnings]

Author Checklist

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    Commits are self-contained and do not do two things at once.
    Commit message is of the form: module: short description
    Commit message explains what's in the commit.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

@hzhou
Copy link
Contributor Author

hzhou commented Jun 22, 2023

test:mpich/pmi ✔️ clear with session_re_init failures addressed in #6564

@hzhou
Copy link
Contributor Author

hzhou commented Jun 22, 2023

After this PR:

$ mpirun -n 2
[mpiexec@tiger] main (mpiexec/mpiexec.c:59): Missing executable. Try -h for usages.

@hzhou hzhou requested a review from raffenet June 22, 2023 17:44
@raffenet
Copy link
Contributor

See also #5598. Is it still necessary? I guess the issue is that its not just the case where there are no argument at all, but specifically no executable to run.

@hzhou
Copy link
Contributor Author

hzhou commented Jun 22, 2023

See also #5598. Is it still necessary? I guess the issue is that its not just the case where there are no argument at all, but specifically no executable to run.

I am afraid so. The 3 fixes are all for different situations albeit looks similar:

  • Missing argument altogether, thus command line parsing was skipped
  • Missing option parameter (-np []) . We allow arbitrary option syntax thus we have to fix theses on a per-option basis
  • Missing executables. Executables are filled in after option parsing, thus need check post parsing.

If user invoke mpiexec without executables, currently it will segfault.
Check for this case and provider proper error messages.
@hzhou hzhou force-pushed the 2306_hydra_exec branch from 188bc6e to 4131397 Compare June 23, 2023 15:44
@hzhou hzhou merged commit 51cbd1d into pmodels:main Jun 23, 2023
@hzhou hzhou deleted the 2306_hydra_exec branch June 23, 2023 15:51
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.

hydra: Segfault with "mpiexec -n 2"
2 participants