OSC-SM: Notified RMA Implementation with Set notify and Bounds - #29
Closed
joe-explr wants to merge 343 commits into
Closed
OSC-SM: Notified RMA Implementation with Set notify and Bounds#29joe-explr wants to merge 343 commits into
joe-explr wants to merge 343 commits into
Conversation
mca_base_component_repository_release_internal() passed NULL as the project name to mca_base_var_group_find(). This generates a lookup key without the project prefix (e.g., "framework_component"), but groups are registered with the project prefix (e.g., "opal_framework_component"). The hash lookup fails, skipping var deregistration before dlclose. After the DSO is unloaded, mbv_storage becomes a dangling pointer, and var_destructor segfaults when accessing mbv_storage->stringval during MPI_Finalize. Use "*" wildcard for the project name, which triggers the linear search path designed for cases where the project is unknown. This matches the pattern already used in opal_info_support.c for the same reason. Since the project name is now always available in the component structure and callers that don't know the project should use the "*" wildcard, NULL is never a valid input. Add an assert to catch this programming error early. Signed-off-by: Shi Jin <sjina@amazon.com>
opal/mca/base: fix var group lookup in component repository release
Signed-off-by: George Katevenis <gkatev@ics.forth.gr>
configury: fix --with-knem=PATH
Add two workflows to automate backporting merged PRs to release branches: - backport.yaml: cherry-picks PR commits to target branches and opens backport PRs with target:* labels. Triggered automatically via backport:* labels on merge, or manually via workflow_dispatch. - backport-command.yaml: parses /backport <branch>... comments on merged PRs and dispatches backport.yaml, with 👀 acknowledgement reactions. GITHUB_TOKEN-triggered events (push, pull_request) do not fire further workflow runs, so CI never ran on auto-created backport PRs. Switch the backport job to a short-lived GitHub App installation token so that the branch push and PR creation are attributed to the app bot rather than github-actions[bot], which causes CI to trigger normally. APP_ID and APP_PRIVATE_KEY must be set as repository secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
using most recent release of IBM's LSF product with Open MPI. This problem goes back to the 4.1.x branch at least. related to open-mpi#13902 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
GitHub Actions: add backport workflows (v2.0)
Node 20 will be deprecated in June, actions/checkout@6 uses Node 24. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Bump actions/checkout to v6
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
…on osc/ubcl Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: BRELLE, EMMANUEL <emmanuel.brelle@bull.com>
Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
…main Update 05/2026: UBCL components with latest Bull cleaning
lsf: add note to docs about problems with
coll/accelerator: stage full input for MPI_IN_PLACE in reduce_scatter and rs_block
…ulate" This reverts commit 43c29a01dbbe44c35dfba315f5bbc56b8d34d63d. Type has just been introduced by recent versions Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
…efines Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
…inking flags become optional Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
…FORTRAN_LOGICAL16 Signed-off-by: Brelle Emmanuel <emmanuel.brelle@bull.com>
Provide a concise entry point for AI coding agents (and the humans driving them) working in the Open MPI source tree. It captures the mental model -- the OPAL/OMPI/OSHMEM projects and their linker boundaries, the MCA architecture -- and the handful of conventions agents most often get wrong (prefix rule, config.h-first, no back-end MPI_*() calls, copyright headers, warning-free builds). It also covers build/smoke-test flow, generated/do-not-edit trees, performance discipline, and the sign-off / commit / branch process. Rather than duplicate the authoritative developer docs, it links into docs/developers/ and docs/contributing.rst so it stays a thin, low-drift orientation map. Signed-off-by: Jeff Squyres <jeff@squyres.com>
Add AGENTS.md to orient AI coding agents
Correct clear spelling mistakes, repeated words, and grammatical issues across the RST documentation tree. This includes developer and user guides, tuning and installation docs, release notes, and MPI/OpenSHMEM man-page sources. Also fix misspelled RST labels and update their references so the documentation links continue to resolve correctly. Validation performed: - aspell scan over docs/**/*.rst with false positives manually filtered - targeted rg sweeps for common misspellings, repeated words, and grammar patterns - git diff --cached --check Signed-off-by: Jeff Squyres <jeff@squyres.com>
The "Setting MCA parameter values" section of the MCA page carried
three standing TODO markers questioning its correctness. Verifying the
claims against the source (opal/mca/base/mca_base_var.c and the PRRTE
schizo/ompi tune-file handling) turned up several errors, now fixed:
* Tuned parameter files DO allow comments: empty lines and lines
beginning with "#" are ignored (schizo_ompi.c; cli-tune.rst). The
page said comments were not allowed.
* The environment-variable form of --tune is mca_base_envar_file_prefix
("envar", one "v"), not mca_base_envvar_file_prefix. Relative tuned
files are resolved against mca_base_param_file_path; there is no
mca_base_envvar_file_path parameter.
* The config-file search parameter is mca_base_param_files (mca_param_files
is only a deprecated synonym); it is comma-delimited, not
colon-delimited, and leftmost files have HIGHER precedence (the page
said the opposite, contradicting its own adjacent list).
* Config-file table: the PMIx system file is pmix-mca-params.conf (not
openpmix-mca-params.conf), and the PRRTE per-user directory is
$HOME/.prte (single R), not $HOME/.prrte.
* Fixed a typo in an example: mpi_show_mca_params_file (the registered
name), not mpi_show_mca_param_file.
The three TODO markers are removed now that the sections are verified.
Signed-off-by: Jeff Squyres <jeff@squyres.com>These three "reduce startup/wireup time" and "static cluster configuration" pages carried TODO markers noting they might be out of date. Checking their claims against the current code base: * reduce-startup-time: the pmix_base_async_modex, async_mpi_init, and async_mpi_finalize MCA parameters and the usnic BTL all still exist and behave as described, so the page was accurate; its TODO is simply removed. * reduce-wireup: the oob_tcp_listen_mode=listen_thread MCA parameter no longer exists. The OOB now lives in PRRTE, and mpirun always services connection requests on a dedicated listener thread by default, so the old tuning advice is obsolete. The page also claimed that every daemon opens a socket back to mpirun, which is not how PRRTE works: the daemons are arranged in a radix tree (routed_radix.c), each connects only to its parent (the RML lifeline), and mpirun-bound traffic is relayed up the tree hop by hop. The fan-out is rml_base_radix, which defaults to 64, so mpirun accepts direct connections from at most 64 daemons regardless of job size. Likewise, the ssh launcher tree-spawns the daemons by default (plm_ssh_no_tree_spawn is false), so mpirun does not launch them all itself. Rewrite the page to describe this behavior and to introduce PMIx "Instant On" (pre-positioning network endpoint information at launch so no global modex/wireup exchange is needed at MPI_Init), which the previous TODO asked for. * static-cluster-config: the PRRTE "routed" framework and its "debruijn" component were removed (routing is now a fixed radix tree tuned only via rml_base_radix), so the routed=debruijn example no longer works. Replace it with a current, equivalent example using the pml framework (build all components, default to ob1). The --enable-mca-no-build option and the ob1 PML still exist as described. Signed-off-by: Jeff Squyres <jeff@squyres.com>
The Platform Notes page carried a TODO asking for a canonical list of required 3rd-party package versions, supported run-time systems, and supported OSes/compilers/interconnects. Populate the page with the current data, verified against the build system and the embedded PRRTE: * Required support libraries with minimum versions (from config/autogen_found_items.m4): OpenPMIx >= 4.2.0, PRRTE >= 3.0.0, hwloc >= 2.1.0 and < 3.0.0, Libevent >= 2.0.21; plus the embedded hwloc 2.7.1 and Libevent 2.1.12, and the Perl 5 / Python 3.6+ build requirements. * Note that a C11 (or newer) compiler is now required (enforced by config/opal_setup_cc.m4). * Run-time systems: reorganized, and each entry now describes how PRRTE obtains the allocation and starts processes there and links to the corresponding "Launching with ..." page under docs/launching-apps/. Notably, the LSF entry points at the LSF page, which documents the known problem with the most recent LSF releases and its workaround. Added Flux, which has a PRRTE ras component but no plm, so its allocations are launched via ssh. Grid Engine support was confirmed still present (ras/gridengine); it is now described as the whole Grid Engine family, matching the wording on the Grid Engine page, rather than the stale "OGE 6.1 and 6.2" list. * Added a network-interconnect summary (shared memory, TCP, UCX for InfiniBand/RoCE, Libfabric/OFI networks, and usNIC) that points to the networking tuning pages. * Refreshed the macOS entry, which still listed 14.x/15.x. Our GitHub Actions CI runs on the macos-latest runner, which currently provisions the macos-26-arm64 image (macOS 26.x on Apple silicon), so that is what is now listed as tested. Intel/x86_64 macOS is not covered by CI, so it moves to the lightly-tested list. Also update the tested-compiler list to name the NVIDIA compilers rather than the historical "Portland". Signed-off-by: Jeff Squyres <jeff@squyres.com>
Audited the "MCA Parameter Changes Between Open MPI 4.x and newer releases" mapping table against the current PRRTE source. Most of the table is accurate (the output/display tokens, ppr/node/core/slot/package mapping words, the nolocal/oversubscribe/nooversubscribe/hwtcpus/pe= modifiers, rankfile:file=, and the core/package binding values all verified), but a few entries were wrong: * hwloc_base_cpu_set / hwloc_base_cpu_list do NOT map to a pe-list=<value> mapping policy: PRRTE rejects a "pe-list=" value on the default-parameter path. The correct replacement is the dedicated hwloc_default_cpu_list parameter (PRTE_MCA_hwloc_default_cpu_list). Fixed the two table rows and the two affected examples (splitting the combined cpu-set + oversubscribe example into two parameters). * The ompi_stream_buffering replacement is an Open MPI parameter, so its environment variable is OMPI_MCA_ompi_stream_buffering, not PRTE_MCA_ompi_stream_buffering. Fixed the example and noted the exception in the section's prefix note. * The old orte_* parameter names have been fully removed (they are not accepted as deprecated synonyms), so the "may be removed in future releases" framing was stale; reworded to say they no longer exist. Also renamed the mapping and binding parameters used throughout the table and examples from rmaps_default_mapping_policy and hwloc_default_binding_policy to their current names, mapby and bindto. The old names are now deprecated synonyms; a note records that they still work but that new configurations should use mapby / bindto. Signed-off-by: Jeff Squyres <jeff@squyres.com>
…ctness docs: correctness pass over MCA, large-cluster, and platform pages
OSHMEM/MCA/SSHMEM/BASE: Change default base address from UINTPTR_MAX to NULL
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
This commit adds notification support to the OSC SM component by implementing the put_with_notify, get_with_notify, rput_with_notify, and rget_with_notify functions. These functions perform the same operations as their non-notify counterparts but also increment notification counters after the data transfer completes. The changes include: - Added function pointer types for notify variants in osc.h - Added function prototypes in osc_sm.h - Implemented the notify functions in osc_sm_comm.c - Updated the module template to register the new functions - Removed TODO comments that have been addressed Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
put_with_notify get_with_notify Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
put_with_notify get_with_notify Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
…for a single and multi rank window. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
…eph.antony18@gmail.com>
… <jajoseph.antony18@gmail.com>
MPI-5.1 names the error class for an invalid notification index MPI_ERR_RMA_NOTIFICATION. Rename the placeholder used by the notified RMA work to match the standard. The class was never registered with the error code subsystem, so MPI_Error_string() and MPI_Error_class() did not know about it; add the missing CONSTRUCT_ERRCODE()/OBJ_DESTRUCT() pair in errcode.c. Also fix the binding generator's ERROR_CLASSES list, where the entry was inserted without a trailing comma and so was silently concatenated with the following 'MPI_ERR_TYPE' element rather than added as a class of its own. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Add the two remaining notification-management procedures from MPI-5.1 section 12.6.1: MPI_WIN_SET_NUM_NOTIFY is a blocking, synchronizing collective that sets the number of notification counters attached at the calling MPI process to exactly num_notifications and resets all of them to zero. MPI_WIN_GET_NUM_NOTIFY is local and returns the number of counters attached at target_rank. Both are wired through the osc framework as new module entry points, so components that do not implement them return MPI_ERR_UNSUPPORTED_OPERATION rather than crashing. The osc/sm implementation carves a fixed per-rank counter region out of the shared segment at window creation, which is therefore the effective MPI_WIN_NOTIFICATION_NUM_UB; a request beyond that capacity is rejected with MPI_ERR_ARG. Each rank publishes its own attached count into the shared segment, so the collective needs only a barrier -- no counts have to be exchanged -- and MPI_WIN_GET_NUM_NOTIFY is a plain shared-memory read. Also add the missing put_notify/get_notify entries to interface_profile_sources, which were omitted when those two procedures were introduced. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Three correctness problems in the osc/sm notified communication path: 1. The notification counters were plain uint64_t but are incremented concurrently by remote origins with opal_atomic_add() and polled by the local rank. Type them opal_atomic_int64_t so that the reads in MPI_WIN_GET_NOTIFY_VALUE are atomic and cannot be hoisted out of a caller's polling loop. 2. The notification index was validated *after* the data movement, so an erroneous call had already overwritten the target window (or, for get, the origin buffer) by the time the error was returned. MPI-5.1 section 12.6.1 makes referencing an out-of-range counter erroneous at initiation, so hoist the check above ompi_datatype_sndrcv() in all four notified operations. The check is factored into a helper, which also fixes MPI_GET_NOTIFY returning OMPI_ERR_BAD_PARAM instead of MPI_ERR_RMA_NOTIFICATION. 3. The get paths used opal_atomic_rmb() before incrementing the target's counter. The notification tells the target that the get has read the window, so the constraint is load-before-store, which a load-load fence does not express; opal_atomic_add() is relaxed and adds no ordering of its own. Use a full opal_atomic_mb(). In MPI_WIN_GET_NOTIFY_VALUE the barrier was likewise placed before the counter load, where it ordered nothing; move it after so that it gives the acquire semantics the caller needs. MPI_WIN_RESET_NOTIFY_VALUE also gains the trailing barrier for the same reason. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Adds the six remaining notified operations from the MPI-5.1 draft -- accumulate, get_accumulate, and the four request-based forms -- so that osc/sm covers all eight defined in section 12.3, and sizes the notification counters from window info rather than a compile-time constant. The counter region was a fixed 16 entries per MPI process carved out of the shared segment, and MPI_WIN_SET_NUM_NOTIFY rejected anything larger. That conflicts with the mpi_assert_max_num_notify info key, whose default of 0 the standard defines as "the implementation does not assume any limit on the number of notification counters". The reservation now comes from that key when one is given, and otherwise from a new osc_sm_num_notify_counters MCA parameter. A request beyond the reservation relocates the counters to a dedicated shared segment instead of failing; when the key was given it is a hard bound, since the window was sized on the strength of that assertion. Growth is collective and runs inside MPI_WIN_SET_NUM_NOTIFY, which the standard already defines as a blocking synchronizing collective. Every process agrees on the new layout through an allgather of the requested counts, and on whether the attach succeeded through an allreduce, so a failure at one process cannot leave others incrementing counters that nobody reads. The published count stays clamped to the current allocation until the larger one exists, so a failed growth cannot leave behind a count that would admit writes past the end of the region. A barrier separates the attach from the unlink, because attach opens the backing file by name and the broadcast does not tell rank 0 that the other processes are finished with it. Each process now caches a per-target pointer to the counters, making the lookup on the path of every notified operation a single indexed load -- cheaper than the previous base-plus-offset arithmetic -- so the ability to relocate the region costs the hot path nothing. Also corrects the reset at the end of component_select(), which zeroed the whole node state and so wiped the notification fields it had just written, and removes a stray double semicolon in ompi_osc_sm_fetch_and_op(). Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
MPI-5.1 section 12.2.6, Table 12.1 caches three attributes on every window: MPI_WIN_NOTIFICATION_NUM_SB, the number of notification counters the implementation supports efficiently; MPI_WIN_NOTIFICATION_NUM_UB, the upper bound on that number; and MPI_WIN_NOTIFICATION_VALUE_UB, the upper bound on a counter value. Without them a program has no portable way to ask how many counters it may request, since MPI_WIN_GET_NUM_NOTIFY reports how many are attached rather than how many are available. The values come from a new osc_win_get_notify_bounds entry point on the osc module, queried once per window while it is configured. A component that does not implement notified communication leaves the entry point NULL and all three attributes read zero, which is the honest answer for such a window and is consistent with its notified operations returning MPI_ERR_UNSUPPORTED_OPERATION. For osc/sm the bounds follow the reservation: with an mpi_assert_max_num_notify assertion both NUM_SB and NUM_UB are that value, since the window was sized for exactly it; without one, NUM_SB is what was reserved and nothing bounds NUM_UB short of the notification index type, because the counters grow on demand. The keyvals are appended after MPI_FT so that the existing predefined values stay put, with matching entries in mpif-values.py to keep the C and Fortran numbering identical. The predefined-keyval bitmap is already bounded by MPI_ATTR_PREDEFINED_KEY_MAX and needed no change. Table 12.1 types VALUE_UB as MPI_Count *, and the attribute machinery has no MPI_Count slot -- every other predefined attribute is integer- or address-valued. It is stored as an MPI_Aint, which is the same width wherever Open MPI runs now that 32-bit environments are unsupported; the reasoning is recorded at the call site so the choice does not later read as a type error. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Covers counter management, all eight notified operations in their blocking and request-based forms, notification index errors, growth past the reserved capacity, the mpi_assert_max_num_notify bound, and the three notification window attributes. A second test forces osc/rdma and checks that every notified entry point reports MPI_ERR_UNSUPPORTED_OPERATION without moving any data, and that the attributes read zero. That is the contract which lets components that do not implement the chapter remain untouched, so it is worth testing directly rather than assuming. Both are single-process tests wired into make check, so the shared segment growth path is exercised only in its single-rank form, where the counters are a plain heap allocation. The collective path -- segment creation, broadcast, attach, the status allreduce and the barrier before unlink -- needs a multi-rank test that this harness cannot host. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
The notified communication code carried long block comments that restated the standard at length and recorded design deliberation. Reduce them to short notes that say what the code does and cite the relevant MPI-5.1 section, so the comment density matches the surrounding osc/sm sources. No functional change. Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the MPI-5.1 notified communication chapter (§12.6) for the
osc/smone-sided component, together with the framework plumbing, Cbindings, window attributes, and error class the feature requires.
Notified RMA lets an origin attach a notification to an RMA operation:
the target's notification counter is incremented only after the data
movement has completed at the target, so the target can poll a counter
instead of participating in a synchronization epoch.
Public MPI interface
bigcount
_cform (16 entry points):MPI_Put_notify,MPI_Get_notify,MPI_Accumulate_notify,MPI_Get_accumulate_notify, and the request-returningMPI_Rput_notify,MPI_Rget_notify,MPI_Raccumulate_notify,MPI_Rget_accumulate_notify. Each takes an additionalint notification_idximmediately beforewin.MPI_Win_set_num_notify,MPI_Win_get_num_notify,MPI_Win_get_notify_value,MPI_Win_reset_notify_value.MPI_ERR_RMA_NOTIFICATION(value 83), registeredin
ompi/errhandler/errcode.candompi/include/mpif-values.py.MPI_WIN_NOTIFICATION_NUM_SB,MPI_WIN_NOTIFICATION_NUM_UB,MPI_WIN_NOTIFICATION_VALUE_UB(keyvals 13–15), appended after the existing
MPI_WIN_*values sothat no established attribute value shifts.
C bindings
12 new
.c.ingenerator templates underompi/mpi/c/(one per notifiedoperation and window procedure), wired into
ompi/mpi/c/Makefile.am,with
MPI_ERR_RMA_NOTIFICATIONadded toompi/mpi/bindings/ompi_bindings/consts.py. No generated output ishand-edited.
osc framework
ompi/mca/osc/osc.hgains the 8 notified operation slots plus 5 modulefunction pointers:
osc_win_get_notify_value,osc_win_reset_notify_value,osc_win_set_num_notify,osc_win_get_num_notify, andosc_win_get_notify_bounds. A componentthat does not implement notified communication leaves them NULL.
Window setup
The three notification attributes are cached on every window at
creation — querying
osc_win_get_notify_boundswhen the componentsupplies it, and caching zeros when it does not, which is an honest
report that no notification counter can be attached to such a window.
MPI_WIN_NOTIFICATION_VALUE_UBis stored viaompi_attr_set_aintbecause the attribute machinery has no
MPI_Countslot and every otherpredefined attribute is integer- or address-valued. This is safe while
MPI_Ainttracks the pointer width; a comment inompi/win/win.crecords that a 32-bit revival would need a real
MPI_Countslot inattribute_value_t.osc/sm implementation
int64_treserved inline in the main sharedsegment (16 per rank by default, tunable via the
osc_sm_num_notify_countersMCA parameter), reached through aper-process
notify_bases[]pointer array so that each notifiedoperation costs a single indexed load regardless of where the counters
currently live.
node_states[]: theattached count, the reserved capacity, and the segment
offset. The last is an offset rather than a pointer because the
shared segment is mapped at a different address in every process.
MPI_Win_set_num_notifygrows on demand into a separatelyallocated overflow segment: allgather the requests so the grow/no-grow
decision is identical everywhere, bcast the new segment descriptor (an
empty
seg_namesignals failure so that no process hangs in a latercollective), allreduce on attach success before any shared state is
mutated, raise the attached count only once the space behind it
exists, barrier, then unlink and drop the old mapping. The allocation
never shrinks.
mpi_assert_max_num_notifyinfo key turns the reservation into ahard cap rather than a trigger for reallocation, and is reported back
through
MPI_Win_get_infoonly when one was actually given.store-store fence; get and the whole accumulate family use a full
barrier, because there the notification asserts that a read of the
target window happened — a load-before-store constraint that a
one-sided fence cannot express.
opal_atomic_add()is relaxed andcontributes no ordering of its own.
count before any data moves, so an erroneous call cannot leave the
target window (or, for get, the origin buffer) modified before the
error is reported.
never bumped for an operation that failed.
MPI_NO_OPis explicitlynot treated as failure: the target window was still read into the
result buffer, which is an access the notification must cover.
MPI_Win_reset_notify_valueuses a singleopal_atomic_swap_64sothat increments arriving between a read and a separate zeroing cannot
be lost.
Instrumentation
Four new SPC counters:
OMPI_SPC_PUT_NOTIFY,OMPI_SPC_RPUT_NOTIFY,OMPI_SPC_GET_NOTIFY,OMPI_SPC_RGET_NOTIFY.Tests
Two new programs under
ompi/test/general/, both wired intomake check, with the binaries added to.gitignore.win_notify.ccovers counter management, blocking and request-basednotified operations, notification-index error cases, on-demand counter
growth, the
mpi_assert_max_num_notifyassertion path, and the threewindow attributes. All 8 notified operations and all 4 management
procedures are exercised.
win_notify_unsupported.cverifies that a window whose component doesnot implement notified communication returns
MPI_ERR_UNSUPPORTED_OPERATIONfrom every notified entry point ratherthan calling through a NULL function pointer.
Open question for reviewers
osc/smpre-attaches its reserved counters, whereasosc/ucxstarts atzero and requires
MPI_Win_set_num_notifybefore any counter may bereferenced. MPI-5.1 §12.6.1 does not state what the initial attached
count is, so neither behavior is provably wrong — but the divergence
means a program that omits
MPI_Win_set_num_notifyworks onsmandfails on
ucx. Worth settling before this lands.