Skip to content

Fork Sync: Update from parent repository#175

Open
github-actions[bot] wants to merge 10 commits into
open-mpi:v4.1from
openpmix:v4.1
Open

Fork Sync: Update from parent repository#175
github-actions[bot] wants to merge 10 commits into
open-mpi:v4.1from
openpmix:v4.1

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

No description provided.

rhc54 and others added 10 commits July 2, 2026 16:42
Claude seems to want it - port of open-mpi/ompi#14065

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 4a2e55e)
Add a Contributor Covenant v1.4 Code of Conduct for the PRRTE project,
following the same pattern used by OpenPMIx.  The authoritative source
is .github/CODE_OF_CONDUCT.md (Markdown); docs/Makefile.am drives a
Python converter script that regenerates docs/code-of-conduct.rst at
build time so the content appears in the Sphinx-built HTML documentation.
The new page is wired into the docs/index.rst toctree between the
Contributing and License sections.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit dfe14c6)
ReadTheDocs does not run Automake, so the pre_build job in
.readthedocs.yaml must invoke the generator script directly before
Sphinx runs.  Also add docs/code-of-conduct.rst to .gitignore since
it is a generated file and should not be tracked.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 3b5598d)
LSF sets LSB_AFFINITY_HOSTFILE for every job, even when the user has
not requested process pinning, in which case the file is empty.  The
new rmaps/lsf component introduced in v3.0.13 fires whenever that
environment variable is present, calls file_parse(), which returns
PRTE_SUCCESS immediately on an empty file leaving num_ranks at zero,
and then incorrectly triggers a fatal "bad-syntax" error instead of
stepping aside.  In v3.0.12 the equivalent code path returned from
the rank_file mapper and let round_robin take over.

Five issues are addressed:

- When file_parse() returns with num_ranks == 0 (empty affinity file),
  return PRTE_ERR_TAKE_NEXT_OPTION so normal mapping proceeds.  This
  fixes the reported regression (GitHub issue #2449).

- Reset the static num_ranks counter to 0 at the top of lsf_map() and
  in the error path.  The counter was never cleared between jobs, so
  the second and subsequent jobs in a DVM session would store rankmap
  entries at wrong indices and read back NULLs, silently producing
  incorrect process placement.

- Move "options->map = PRTE_MAPPING_BYUSER" to just after last_mapper
  is set, before the per-app loop.  It was inside the per-process inner
  loop, so prte_rmaps_base_get_target_nodes() was called on the first
  app with the wrong map type.  The rank_file mapper sets this flag in
  the same early position.

- Fix the error: path to destruct rankmap and release its rfmap entries,
  matching what the success path already does.  Previously only
  node_list was cleaned up on error.

- Remove the dead assigned_ranks_array from file_parse().  It was
  allocated and initialized (copied from the rank_file parser) but
  never written to, read, or freed.  Also initialize sep = NULL to
  prevent use of an indeterminate value if a malformed affinity-file
  line contains no space separator.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit a01985a)
All RAS components (lsf, slurm, pbs, flux, gridengine, hosts) create
prte_node_t objects and hand them to prte_ras_base_node_insert, but
none of them applied the FQDN-to-short-name normalization that
hostfile.c and dash_host.c had been doing independently.  This meant
nodes sourced directly from a scheduler API (e.g. lsb_getalloc()) were
inserted into prte_node_pool with whatever hostname the scheduler
returned, with no short-name alias, so prte_quickmatch and
prte_nptr_match could fail when the affinity file or -host list used a
different form of the same name.

Add a static normalize_node() helper in ras_base_node.c.  When
keep_fqdn_hostnames is not set and a node name contains a dot, it
copies the full FQDN, truncates node->name in place to the short form,
stores the FQDN in node->rawname (or in aliases if rawname is already
populated), and appends rawname to node->aliases.  normalize_node() is
called for every new node just before it is inserted into
prte_node_pool, after the existing FQDN-detection check so that
prte_have_fqdn_allocation is still set correctly.

Remove the equivalent per-site normalization code from hostfile.c
(STRING, RELATIVE, and RANK token branches) and dash_host.c.  Both
utilities now create node objects with the raw name from the file or
command line; the RAS base normalizes on insertion.  The matching
functions (prte_quickmatch, prte_node_match, prte_nptr_match) all
check node->aliases, so nodes produced by these utilities in the rmaps
filter path continue to match against pool nodes correctly because the
pool node's FQDN alias satisfies the alias check even when the filter
node carries only the original unstripped name.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit ea2b8e6)
…actor

Commit 8ddaa19 removed the alias variable from hostfile_parse_line
when centralizing FQDN/short-name normalization into the RAS base, but
left behind the alias %s format specifier and its argument in the
PMIX_OUTPUT_VERBOSE call at the top of the include-node path.  Drop
both so the code compiles.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 38c7eb9)
Update them to PRRTE

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit cbbf009)
Display directives (map, bindings, allocation, ...) are job-level: there is
no way to scope a display to a single app context.  When a command line
carries more than one - most easily by attaching one to a second app in an
MPMD line - silently applying just one would be surprising.

Detect this in prte_prun_parse_common_cli(), which both prun and the prte
HNP launcher route through, and reject it with the existing "multi-instances"
diagnostic and PRTE_ERR_BAD_PARAM rather than promoting an app-level
directive to the job (which has no sensible meaning for display).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 63754e3)
Add a golden-rule bullet to AGENTS.md pointing AI coding agents at the
portable compiler attribute wrappers defined in
src/include/prte_config_bottom.h (pulled in transitively by
prte_config.h).

These macros — __prte_attribute_unused__, __prte_attribute_noreturn__,
__prte_attribute_format__, __prte_attribute_deprecated__, and many
more — expand to the appropriate __attribute__((...)) on compilers that
support it and to nothing elsewhere. The new guidance tells agents to
reach for them (for example, to mark an unused function parameter) rather
than writing a bare __attribute__ or leaving a compiler warning
unaddressed.

Docs-only change to the agent guidance file; no code or build impact.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 15f1c27)
Signed-off-by: Ralph Castain <rhc@pmix.org>
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.

1 participant