Skip to content

Phase 1: dependency-free native build (single-rank MPI shim) - #170

Merged
neuromechanist merged 2 commits into
feature/issue-165-epic-native-binariesfrom
feature/issue-166-phase1-static-build
Jul 17, 2026
Merged

Phase 1: dependency-free native build (single-rank MPI shim)#170
neuromechanist merged 2 commits into
feature/issue-165-epic-native-binariesfrom
feature/issue-166-phase1-static-build

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

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.f90 is 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 become memcpy(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.sh builds the same patched source with the shim (gfortran) and with mpif90, 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 no libmpi.

Test plan

@neuromechanist
neuromechanist merged commit c03ff30 into feature/issue-165-epic-native-binaries Jul 17, 2026
6 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-166-phase1-static-build branch July 17, 2026 16:55
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