Skip to content

report Yaksa autogen depth in mpichversion - #7914

Merged
hzhou merged 4 commits into
pmodels:mainfrom
jeffhammond:fix-issue-6677
Aug 4, 2026
Merged

report Yaksa autogen depth in mpichversion#7914
hzhou merged 4 commits into
pmodels:mainfrom
jeffhammond:fix-issue-6677

Conversation

@jeffhammond

@jeffhammond jeffhammond commented Jul 31, 2026

Copy link
Copy Markdown
Member

Issue #6677 points out that the top-level ./autogen.sh -yaksa-depth=N choice can materially affect the generated Yaksa pack/unpack code, but the value was not visible later from mpichversion. Since mpichversion already reports the configure argument string, record the selected autogen Yaksa depth in a small m4 file and prepend it to CONFIGURE_ARGS_CLEAN as -yaksa-depth=N. This keeps the user-facing output in the existing MPICH configure field, which matches the request to display the autogen choice as if it were a configure option.

The default tracked value is 2, matching autogen.sh's current default. Full Yaksa autogen runs update the file after the Yaksa autogen command succeeds, so non-default ./autogen.sh -yaksa-depth=N runs propagate the selected value into the generated configure script.

Verified by regenerating with ./autogen.sh --without-fortran --without-test, configuring a fresh GCC build directory with CC=gcc CXX=g++ using --disable-fortran --disable-cxx --with-device=ch4:ofi --with-libfabric=embedded --enable-g, and building with make -j50. The resulting build-gcc-fix-issue-6677/src/env/mpichversion -configure output includes -yaksa-depth=2 ahead of the configure options.

Pull Request Description

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.

Resolves #6677

@jeffhammond

Copy link
Copy Markdown
Member Author

I accept that this may not be your preferred method for implementing this, particularly since non-expert users might be confused and thing MPICH configure: -yaksa-depth=2 ... --with-device=ch4:ofi --with-libfabric=embedded --enable-g means that -yaksa-depth=2 ... was part of the arguments to configure...

Issue pmodels#6677 points out that the top-level ./autogen.sh -yaksa-depth=N
choice can materially affect the generated Yaksa pack/unpack code, but the
value was not visible later from mpichversion.  Since mpichversion already
reports the configure argument string, record the selected autogen Yaksa depth
in a small m4 file and prepend it to CONFIGURE_ARGS_CLEAN as -yaksa-depth=N.
This keeps the user-facing output in the existing MPICH configure field, which
matches the request to display the autogen choice as if it were a configure
option.

The default tracked value is 2, matching autogen.sh's current default.  Full
Yaksa autogen runs update the file after the Yaksa autogen command succeeds,
so non-default ./autogen.sh -yaksa-depth=N runs propagate the selected value
into the generated configure script.

Verified by regenerating with ./autogen.sh --without-fortran --without-test,
configuring a fresh GCC build directory with CC=gcc CXX=g++ using
--disable-fortran --disable-cxx --with-device=ch4:ofi --with-libfabric=embedded
--enable-g, and building with make -j50.  The resulting
build-gcc-fix-issue-6677/src/env/mpichversion -configure output includes
-yaksa-depth=2 ahead of the configure options.  git diff --check is clean.
@hzhou

hzhou commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

I pushed a few modifications:

  1. let the gen_pup.py generate the artifact info on how many depths it used. It is the root source of truth. And it allows potentially different depths for different backends.
  2. Put that info in the feature list.
image

hzhou added 3 commits August 4, 2026 11:45
The "-yaksa-depth" is an autogen option. Listing it as configure option
may mislead users. Rather, show yaksa in the feature list.
Have each backend's genpup.py write an autogen_info file recording the
pup-max-nesting depth. Yaksa's configure reads these files, assembles
MPICH_YAKSA_INFO (e.g. "seq(depth=2) cuda(depth=2)"), and exports it
via localdefs for MPICH to consume.
Replace the m4_include of maint/yaksa_depth.m4 with MPICH_YAKSA_INFO
exported from yaksa's localdefs. The feature string now shows per-backend
depth, e.g. "yaksa(seq(depth=2) cuda(depth=2))".
@hzhou

hzhou commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@jeffhammond Please review

@jeffhammond

Copy link
Copy Markdown
Member Author

LGTM

@hzhou
hzhou merged commit ab53493 into pmodels:main Aug 4, 2026
6 checks passed
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.

mpichversion should display yaksa-depth

2 participants