Skip to content

Nonant name validation#339

Closed
bknueven wants to merge 5 commits intoPyomo:mainfrom
bknueven:nonant_name_validation
Closed

Nonant name validation#339
bknueven wants to merge 5 commits intoPyomo:mainfrom
bknueven:nonant_name_validation

Conversation

@bknueven
Copy link
Copy Markdown
Collaborator

@bknueven bknueven commented Sep 27, 2023

TODOs:

  • Make test for bad farmer, both with local and global check
  • See how expensive this check is global_toc on entry and exit
  • Produce a better error when the reduction check fails
  • Pickle bundles will fail the test, so it needs to be optional (default to True)

@bknueven bknueven force-pushed the nonant_name_validation branch from 4bf7df5 to deb66a6 Compare September 28, 2023 16:26
Copy link
Copy Markdown
Collaborator Author

@bknueven bknueven left a comment

Choose a reason for hiding this comment

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

Maybe we can use this module to avoid some unnecessary copying:

https://docs.python.org/3/library/struct.html

@bknueven bknueven self-assigned this Nov 22, 2024
DLWoodruff added a commit to DLWoodruff/mpi-sppy-1 that referenced this pull request Mar 16, 2026
Verify that nonant variable names match (same order) across all
scenarios, catching a common bug where scenario creators provide
variables in inconsistent order. Uses hashlib for cross-rank
comparison via MPI allreduce. Adds --turn-off-names-check option
(auto-disabled for proper bundles). Includes bad_farmer test example.

Resurrects the idea from PR Pyomo#339 with a fresh implementation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DLWoodruff added a commit that referenced this pull request Mar 17, 2026
* Add nonant variable name validation across scenarios

Verify that nonant variable names match (same order) across all
scenarios, catching a common bug where scenario creators provide
variables in inconsistent order. Uses hashlib for cross-rank
comparison via MPI allreduce. Adds --turn-off-names-check option
(auto-disabled for proper bundles). Includes bad_farmer test example.

Resurrects the idea from PR #339 with a fresh implementation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Document --turn-off-names-check in generic_cylinders.rst

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix ruff: remove unused import and variable in test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Update generic_cylinders.rst

* Fix nonant name validation for ADMM, bundles, and no-MPI

- Use MPI.INT (not MPI.LONG) for cross-rank hash check, fixing the
  no-mpi4py mock MPI stub
- Auto-disable names check when scenarios_per_bundle is set (proper
  bundles create scenarios with different name prefixes)
- Disable names check in ADMM cylinder scripts (ADMM wrapping creates
  scenarios with different variable naming conventions)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DLWoodruff
Copy link
Copy Markdown
Collaborator

PR#634 provided this functionality

@DLWoodruff DLWoodruff closed this Mar 17, 2026
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