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

maint: fix and cleanup maint/extracterrmsgs #5819

Merged
merged 4 commits into from
Feb 7, 2022
Merged

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Feb 1, 2022

Pull Request Description

We have been manually setting MPI error class index in
src/mpi/errhan/baseerrnames.txt, and it has been out-of-sync with the
values defined in mpi.h. This commit does the following:

  • Remove the index from baseerrnames.txt and directly load the defined
    value from mpi.h instead.
  • Add UNKNOWN entry to map the missing entries in baseerrnames.txt.
  • When autogen.sh fails to extract error messages, do not generate dummy
    defmsg.h, fail instead. The dummy header will break the error class
    message translation anyway.
  • Better indentation for the generated defmsg.h
  • Optimize the script

TODO

  • Add use strict to the script

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 Feb 1, 2022

test:mpich/ch3/most
test:mpich/ch4/most

errors/comm/userdup failed. It is important to inject dummy generic message in the strict strcmp order!

@hzhou
Copy link
Contributor Author

hzhou commented Feb 1, 2022

test:mpich/custom
✔️

@hzhou hzhou requested a review from raffenet February 1, 2022 17:07
@hzhou
Copy link
Contributor Author

hzhou commented Feb 1, 2022

test:mpich/ch3/most
test:mpich/ch4/most

nearly all ✔️ , just 1 unreleated io failure on ch3-tcp-centos32

@hzhou
Copy link
Contributor Author

hzhou commented Feb 1, 2022

test:mpich/ch3/most
test:mpich/ch4/most

Copy link
Contributor

@raffenet raffenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK. One minor nitpick in comment.

$generic_loc{"UNKNOWN"} = ":[NONE]";
$longnames{"UNKNOWN"} = "Unknown error class";
# add a dummy UNKNOWN entry in the front.
# NOTE: assume all other generic message are loower cases so "UNKNOWN" will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/loower cases/lowercase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx. Fixed.

hzhou added 4 commits February 7, 2022 15:53
We have been manually setting MPI error class index in
src/mpi/errhan/baseerrnames.txt, and it has been out-of-sync with the
values defined in mpi.h. This commit does following:

* Remove the index from baseerrnames.txt and directly load the defined
  value from mpi.h instead.

* Add UNKNOWN entry to map the missing entries in baseerrnames.txt.

* When autogen.sh fails to extract error messages, do not generate dummy
  defmsg.h, fail instead. The dummy header will break the error class
  message translation anyway.
Add some indentation to the generated src/mpi/errhan/defmsg.h.
Re-initializing %KnownErrRoutines for every line of the source code is
waste of time. Just load once can make the script run much faster --
from 3 seconds to a fraction of a second.
Use strict prevents misuse of global variables in Perl scripts.
@hzhou hzhou merged commit 51e41ea into pmodels:main Feb 7, 2022
@hzhou hzhou deleted the 2201_errmsgs branch February 7, 2022 22:01
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.

2 participants