| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Merge pull request #14037 from jsquyres/pr/opal-graph-edge-count opal/class: fix opal_graph edge count on vertex removal | 2 个月前 | |
datatype: add opt_desc/desc equivalence test, shared corpus, and unpack oracle Introduce a reusable, public-MPI-only datatype corpus (ompi/test/datatype/datatype_corpus.[ch]) that builds and commits a curated set of committed datatypes, each paired with an independent by-hand pack/unpack reference and a set of shape traits. The corpus is consumer-agnostic: it describes each datatype but knows nothing about how a given test selects, drives, or reports on them, so more than one test can share a single definition of each construction. Add opt_desc_equiv, which drives every corpus entry through both the optimized descriptor and a generic walk over the canonical descriptor, across a sweep of fragment sizes, and asserts the two packed streams are byte-identical and both round-trip correctly. This catches optimizer rewrites that would change the on-the-wire layout. When the corpus supplies a by-hand pack reference the opt-path packed stream is also compared against it, catching early-completion bugs that would otherwise cause both opt and desc paths to agree on a short stream. The by-hand unpack reference is similarly used as an independent oracle against the opt-path unpacked buffer, catching common-mode bugs that affect both unpack interpreters identically. PAIR entries (distinct send/recv datatypes) are checked twice: once for the send type and once for the receive type. Refactor to_self to consume the corpus instead of carrying its own builders and by-hand baselines; it keeps its historical --data selection by matching each corpus entry's name against its own option table. The builders (including the DDTBench-derived shapes) move verbatim into the corpus, and a few adversarial shapes -- single-iteration, zero/negative extent, overlap, and mixed-type promotion -- are added to stress the optimizer and positioning edges. Cap --trials, --cycles, and --warmups at MAX_TRIALS (10000) to prevent stack overflows from the VLAs in print_result() sized by num_trials. Document that dump_datatypes is intentionally not broadcast to other ranks since datatype optimization is deterministic. Also fix OPAL_DATATYPE_SAFEGUARD_POINTER to bound negative-extent datatypes correctly. Instances may stride backward, so the region touched by COUNT copies is the union over all of them: fold a negative span into the lower bound and a positive span into the upper bound rather than assuming the last copy sits at the highest address. Without this the corpus's adversarial negative-extent shape trips false-positive debug warnings. Signed-off-by: George Bosilca <gbosilca@nvidia.com> | 23 天前 | |
Fix typos in the opal/ subdirectory Found via `codespell` Signed-off-by: luz paz <luzpaz@github.com> | 4 年前 | |
ABI: compile the C and mpif-h bindings once, not twice Where weak aliases are unavailable, Open MPI compiled every C binding a second time, with OMPI_BUILD_MPI_PROFILING=0, purely to produce the public MPI_* symbols; the first compile produced PMPI_*. That is what the libmpi_c_noprofile, libmpi_c_abi_noprofile, libmpi_mpit_noprofile and libmpi_mpit_abi_noprofile convenience libraries were for. Now that MPI_* are weak symbols rather than weak aliases, the second compile is unnecessary: the profiling compile can emit both. Emit a weak MPI_* definition that forwards to the strong PMPI_* one, and delete the four *_noprofile libraries. This is the scheme MPICH uses -- on arm64 the resulting MPI_Send is a weak symbol whose entire body is a single branch instruction to PMPI_Send. Note that a weak *alias* is not an option here: Mach-O cannot express one. There is no way to mark a ".set" alias as a weak definition (verified against ld64: .weak_definition, .weak_reference and #pragma weak all leave the alias strong), which is precisely why the second compile existed. The forwarding definition is guarded on !OPAL_HAVE_WEAK_ALIASES, since where aliases *are* available (ELF) the alias already is the weak MPI_* definition and a second definition would be a duplicate symbol. MPI_Pcontrol is variadic, so its arguments cannot be forwarded. Open MPI's implementation ignores them and returns MPI_SUCCESS, and MPICH's weak MPI_Pcontrol does the same, so the wrapper does that directly. Add __opal_attribute_weak__ for the plain weak attribute; OPAL previously had only __opal_attribute_weak_alias__. This covers the C bindings (generated, hand-written, and MPI_T). The Fortran mpif-h bindings still compile twice: they are 443 hand-written files, each exposing four name-mangled entry points, so converting them means roughly 1,772 forwarding definitions and wants a generator rather than a hand edit. BUILD_MPI_BINDINGS_LAYER therefore survives, now used only by Fortran. Verified on macOS (single compile; MPI_* 698/698 weak in libmpi, 657/657 in libmpi_abi) and Linux (unchanged; the wrapper is correctly suppressed): examples, make check, make check-abi, make check-abi-mpich, and PMPI interposition all pass. ABI: compile the mpif.h bindings once, not twice This finishes what the previous commit started for the C bindings. Where weak aliases are unavailable, every mpif.h binding was compiled a second time, with OMPI_BUILD_MPI_PROFILING=0, purely to emit the public MPI_* Fortran entry points; the profiling compile emitted PMPI_* and renamed the implementation to pompi_x_f. The bodies were compiled twice. Emit the MPI_* entry point from the profiling compile instead, as a weak definition forwarding to the same implementation the strong PMPI_* entry point calls, and delete the second compile. The implementation keeps its ompi_x_f name and is no longer renamed. Add OMPI_GENERATE_WEAK_F77_BINDINGS alongside OMPI_GENERATE_F77_BINDINGS. Like its sibling it emits a single entry point, in whichever name-mangling scheme the Fortran compiler uses; it just marks it weak. Twelve bindings (MPI_Aint_add and friends) spell their entry points out longhand because the macro does not cover non-void return types; those are marked weak directly. With only one compile left, the profile/ subdirectory has no reason to exist: its entire apparatus -- the 441 p*.c symlinks, the duplicate linked_files list, and the symlink rule -- existed only to compile the same basenames a second time with different flags. Compile the real sources directly in mpif-h/ (with OMPI_BUILD_MPI_PROFILING=1) instead, and delete profile/ entirely. The sources move back into the library's _SOURCES list, which also makes them distributed again -- the previous arrangement compiled them only as nodist_ symlinks, so "make dist" silently shipped no mpif.h binding sources at all. psizeof_f.f90 generation moves up alongside sizeof_f.f90, and the BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER conditional (now identical to OMPI_BUILD_FORTRAN_MPIFH_BINDINGS) is gone. register_datarep_f.c needed a fix: its OBJ_CLASS_INSTANCE was guarded on "!OMPI_BUILD_MPI_PROFILING || OPAL_HAVE_WEAK_ALIASES", i.e. it was emitted by whichever compile was not the profiling one. With only one compile left that guard emitted it nowhere, and the Fortran bindings failed at run time with a missing ompi_intercept_extra_state_t_class. The bindings are now compiled exactly once, so the guard is gone. With C and Fortran both converted, OMPI_PROFILING_COMPILE_SEPARATELY is always 0 and its three AM_CONDITIONALs (BUILD_MPI_BINDINGS_LAYER, COMPILE_PROFILING_SEPARATELY, BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER) are gone. A compiler with neither weak symbols nor weak aliases can no longer build the profiling interface, so configure now says so explicitly rather than silently producing a broken library. ompi/test/mpi-abi: the mpif.h ABI helper check looks for each helper's source in mpif-h/Makefile.am, which once again lists every binding source directly. Verified on macOS (mpif.h MPI_* now weak: 457 weak entry points, 613 strong PMPI_*) and Linux (unchanged; the weak wrapper is correctly suppressed where weak aliases exist): fresh VPATH builds on both, the Fortran examples under mpirun -np 2, and a "make dist" tarball that ships exactly the 441 binding sources with no profile/ remnants. ftmpi: compile the MPIX_* bindings once; remove the profile/ dirs These were the last two profile/ subdirectories in the tree. ompi/mpiext/ftmpi/c compiled every binding twice: once in c/ with OMPI_BUILD_MPI_PROFILING=0 to emit a strong MPIX_* symbol, and once in c/profile/ (via p*.c symlinks) with OMPI_BUILD_MPI_PROFILING=1 to emit the strong PMPIX_* symbol plus a weak MPIX_* alias. Both copies were always built and both linked into libmpiext_ftmpi_c.la, so the strong MPIX_* from the non-profiling compile always won over the weak alias -- which also meant PMPI-based tools could never actually intercept the MPIX_* calls. Convert to the same single-compile scheme the generated C bindings use: compile once with OMPI_BUILD_MPI_PROFILING=1, emitting the strong PMPIX_* entry point and a weak MPIX_* -- via a weak alias where the platform has them, and via a weak forwarding definition where it does not (e.g., macOS). Interception now works for MPIX_* too. ompi/mpiext/ftmpi/use-mpi-f08/profile/ held hand-written PMPIX_*_f08 wrapper copies of the MPIX_*_f08 wrappers. Fortran has no weak symbols, so both wrappers must be spelled out; fold each PMPIX_*_f08 subroutine into the same file as its MPIX_*_f08 sibling and delete the subdirectory. Also remove the now-stale profile/ .gitignore entries for the ompi tree (ompi/mpi/c/profile, ompi/mpi/tool/profile, and the use-mpi-f08/profile leftovers referred to directories that no longer exist; the oshmem entries remain because that build still creates its profile/ directories at build time). Signed-off-by: Jeff Squyres <jeff@squyres.com> | 1 个月前 | |
Merge pull request #14316 from rhc54/topic/sync Fix a typo and change async modex default | 24 天前 | |
update to safety valve for MCA callbacks I used to have a "use_safety_valve" that was meant to conditionally turn on the extra "unregister" call at MCA .so unload time. Reviewers became conserned about whether this was module-safe and wanted locks, but really the entire "use_safety_valve" bookkeeping is unnecessary. The logic of a safety valve is to assume bad code (like the oshmem mismatch) could be using the register/unregister system and thus to always unconditionally call unregister at unload time, regardless of whether a nice matched pair of register/deregister already happened or if we're in the oshmem case where they failed to make such a match. With that being the design it was just necessary to update the opal_mem_hooks_unregister_release() function to be safe regardless of what context it's being called from (eg, if the callback is already unregistered, or if it was never registered in the first place). Also for compatibility I switched from directly using __attribute__((destructor)) to __opal_attribute_destructor__ Signed-off-by: Mark Allen <markalle@us.ibm.com> | 3 年前 | |
opal_info: fix integer overflow parsing --level (CID 1697543) The --level command line value was parsed with strtol() and the result assigned directly to an mca_base_var_info_lvl_t, an unsigned enum type. An out-of-range input (e.g., "0" or a negative number) made the intermediate expression negative, which wrapped around when converted to the enum; the subsequent range check only caught it by accident of that wraparound. Coverity flagged the conversion as CID 1697543. Parse and range-check the value in a long, and convert to the enum type only after validation. opal_info_do_params() and opal_info_do_type() contained verbatim copies of the same parsing block (with the same defect); replace both with calls to the existing opal_info_max_level() helper so the parsing logic lives in exactly one place. Signed-off-by: Jeff Squyres <jeff@squyres.com> | 1 个月前 | |
Fix typos in the opal/ subdirectory Found via `codespell` Signed-off-by: luz paz <luzpaz@github.com> | 4 年前 | |
opal/util/show_help: slurp help text files into C code Per discussion from https://github.com/open-mpi/ompi/wiki/Meeting-2025-03-14, we would like to make relocating an Open MPI installation easier. Specifically, text help files are something that Open MPI currently has to find in the install tree filesystem at run-time. If, instead, we can slurp these text files into C code, then there's nothing to find at run time. That being said, even with this change, developers will still maintain help messages in the various help_*.txt files around the code base. Maintaining descriptive, user-friendly help messages in text files (instead of manually hand-coding long strings in C) has proven to be quite useful. We do not want to lose this capability. This commit adds a step during "make" (in opal/util), those help_*.txt files are encoded into an indexed array of C strings in opal/util/show_help_content.c. opal_show_help*() then can look up the appropriate help strings via filename / topic tuples, just like it used to -- these strings now just happen to be in C variables instead of text files. This work is intended for main / v6.0.x -- not for v5.0.x. Signed-off-by: Jeff Squyres <jeff@squyres.com> | 1 年前 | |
opal/datatype: remove convertor checksum support The checksum-enabled convertor compiled pack and unpack a second time. No production code has used it for years, but it retained duplicate hot-path logic, convertor state, and a separate internal library. Remove checksum mode, its API and state, duplicate library, configure option, unused CRC utility, and dedicated test. Keep normal copies routed through cbmemcpy so accelerator handling is unchanged. With the checksum state gone, group immutable descriptor and dispatch fields separately from mutable runtime fields. Keep the frequently accessed conversion state on one cache line without changing the overall convertor size. Signed-off-by: George Bosilca <gbosilca@nvidia.com> | 24 天前 | |
opal/util/show_help: slurp help text files into C code Per discussion from https://github.com/open-mpi/ompi/wiki/Meeting-2025-03-14, we would like to make relocating an Open MPI installation easier. Specifically, text help files are something that Open MPI currently has to find in the install tree filesystem at run-time. If, instead, we can slurp these text files into C code, then there's nothing to find at run time. That being said, even with this change, developers will still maintain help messages in the various help_*.txt files around the code base. Maintaining descriptive, user-friendly help messages in text files (instead of manually hand-coding long strings in C) has proven to be quite useful. We do not want to lose this capability. This commit adds a step during "make" (in opal/util), those help_*.txt files are encoded into an indexed array of C strings in opal/util/show_help_content.c. opal_show_help*() then can look up the appropriate help strings via filename / topic tuples, just like it used to -- these strings now just happen to be in C variables instead of text files. This work is intended for main / v6.0.x -- not for v5.0.x. Signed-off-by: Jeff Squyres <jeff@squyres.com> | 1 年前 | |
Rename the use of "whitelist" Use the term "allowlist" instead of "whitelist" in the script that looks for common symbols. Signed-off-by: Jeff Squyres <jsquyres@cisco.com> | 6 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 23 天前 | ||
| 4 年前 | ||
| 1 个月前 | ||
| 24 天前 | ||
| 3 年前 | ||
| 1 个月前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 24 天前 | ||
| 1 年前 | ||
| 6 年前 |