Phase 1: dependency-free native build (single-rank MPI shim) - #170
Merged
neuromechanist merged 2 commits intoJul 17, 2026
Conversation
neuromechanist
merged commit Jul 17, 2026
c03ff30
into
feature/issue-165-epic-native-binaries
6 checks passed
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 free
to 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.
Summary
Builds the AMICA Fortran reference into a self-contained binary with no MPI runtime, no MKL, and no vendor math library, so it can ship as a release asset and run without a user-installed toolchain. Extends sccn/amica PR #53's vendor-neutral recipe with a single-rank MPI shim.
Closes #166. Part of epic #165.
Key result
amica15.f90is MPI+OpenMP+LAPACK but pyAMICA runs it as one process; every MPI collective it uses is trivial for a single rank.native/mpi_single.{f90,c}provide the constants + ~11 subroutines (reduce/gather becomememcpy(recv, send, count*datatype)), removing the Open MPI runtime dependency (the last one after PR #53 removed MKL/AMD LibM).Proven mathematically identical to real Open MPI:
validate_shim.shbuilds the same patched source with the shim (gfortran) and withmpif90, pins the RNG seed, runs one iteration on the bundled sample EEG, and asserts machine-epsilon agreement: LL max|diff| = 8.9e-16, W/A = 1.7e-18, all params <= 5e-16 (tol 1e-12). One iteration is the discriminating window (the optimizer amplifies last-bit differences over iterations, cf. #51/#27). The shim binary links nolibmpi.Test plan
bash native/validate_shim.sh(needs gfortran + mpif90): PASS at 8.9e-16.