Skip to content

prted: do not register a tool's namespace with PMIx - #2880

Merged
rhc54 merged 1 commit into
openpmix:masterfrom
rhc54:topic/tool-no-register
Nov 2, 2026
Merged

rhc54 merged 1 commit into
openpmix:masterfrom
rhc54:topic/tool-no-register

Conversation

@rhc54

@rhc54 rhc54 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PRRTE registered a namespace with PMIx for every tool that connected (prte_pmix_server_register_tool): job size, apps, node and proc info. These are guesses - PRRTE knows nothing of a tool's job beyond what the tool sends - and the tool library sets the same well-known values for itself (pmix_tool_init_info).

A companion PMIx change refuses a tool that named itself, with PMIX_ERR_EXISTS, when the host registers a namespace of that name while it decides on the tool. Such a namespace can only be a job of the host's that took the name meanwhile, and the tool joining it would turn the job's own processes away. With that change, PRRTE's registration of the tool's own namespace would get every prun and pterm refused. So this PR stops registering it.

  • prte_pmix_server_register_tool() now only builds the tool's job object, which PRRTE uses to retire the tool's job when it leaves. Both callers, the master's and the relay's, answer the tool at once.
  • The function no longer needs a PMIx server, so test_tool_registration now covers all of it, including a tool that sent no command line. The docs/todo.rst entry for that is removed.

This must merge before the PMIx change. PMIx CI builds PRRTE master, and with today's PRRTE the new PMIx refuses prun and pterm (PMIX_ERR_EXISTS).

Tested on macOS, against both today's PMIx master and the PMIx change:

  • PRRTE unit tests: all pass.
  • A DVM with prun -n 2 hostname and pterm works.

PRRTE knows nothing of a tool's job beyond what the tool sends: the job
size, app and proc info it registered for each tool were guesses, and
the tool library sets the same well-known values for itself.

PMIx is to treat a namespace the host registers while it decides on a
tool that named itself as a job of the host's, and refuse the tool with
PMIX_ERR_EXISTS, so that such a tool cannot join a job of that name that
the host starts meanwhile. Registering the tool's own namespace there
would get every prun and pterm refused.

prte_pmix_server_register_tool() now only builds the tool's job object,
which PRRTE needs to retire the tool's job when it leaves, and both
callers answer the tool at once. Nothing in it needs a PMIx server any
more, so its unit test covers the whole of it, including a tool that
sent no command line, and the todo entry for that goes.

Signed-off-by: Ralph Castain <rhc@pmix.org>
@rhc54
rhc54 merged commit c7304cd into openpmix:master Nov 2, 2026
37 of 40 checks passed
@rhc54
rhc54 deleted the topic/tool-no-register branch November 2, 2026 21:51
rhc54 added a commit to openpmix/openpmix that referenced this pull request Nov 2, 2026
- A tool or launcher acts on events, key deletions and store updates
  (tags 0, 4 and 5) only from a server of its own, as it does for IOF.
  A peer a tool makes its server with PMIx_tool_set_server counts as
  one.
- A call joining a group construct still collecting must be of the
  same operation and, when the call that began it listed every
  participant, one of them.
- An event at PMIX_RANGE_NAMESPACE with no targets is delivered live to
  the source's namespace only, as cached-event replay already does.
- An event from a client carrying more than one PMIX_EVENT_CUSTOM_RANGE
  is refused with PMIX_ERR_BAD_PARAM.
- A client's monitor may raise PMIX_SUCCESS (the monitor's own code), a
  monitor code, or a user code - one beyond PMIX_EXTERNAL_ERR_BASE, or a
  positive one; other codes are refused with PMIX_ERR_BAD_PARAM. A
  monitor's alert carries its ID, its settings and the heartbeats or
  checks missed, under two new attributes, PMIX_MONITOR_HEARTBEAT_MISSED
  and PMIX_MONITOR_FILE_MISSED.
- An IOF deregistration from a peer other than the one that registered
  the request is answered PMIX_ERR_NOT_FOUND.
- A commit carrying a "pmix" key other than PMIX_QUALIFIED_VALUE is
  refused whole, before anything in it is stored. PMIx_Put and the
  commit share one helper for the rule, pmix_key_may_be_put.
- A get qualified by PMIX_SESSION_ID answers about the session named and
  leaves the job in its own session; the job_data_changed record that
  went with the old behaviour is removed.
- A tool that named itself is refused with PMIX_ERR_EXISTS when the host
  registers a namespace of that name while deciding on the tool, and
  when it names a rank the host did not register in a namespace the
  host did. docs/hosts says not to register such a tool's namespace;
  PRRTE no longer does (openpmix/prrte#2880).

Each change has a unit test.

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