Implement parallel GMRES solver with MPI support#56
Open
Conversation
- Created src/solver directory with GMRES implementation - Implemented gmres.h header with public API - Implemented gmres.c with full GMRES(m) algorithm - Added MPI parallelization for distributed vectors - Created comprehensive test program (gmres_test.c) - Added Makefile for standalone building - Added detailed README with usage examples - All tests passing for 1, 2, and 4 MPI processes Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
- Added CMakeLists.txt for solver directory - Updated src/CMakeLists.txt to include solver subdirectory - Updated Makefile with --oversubscribe flag for tests - MPI is now an optional dependency - Tests pass with 1, 2, and 4 processes Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
- Initialize all pointers to NULL before allocation - Use goto cleanup pattern for consistent error handling - Ensure safe memory deallocation even on allocation failures - Add status variable to track success/failure explicitly - All tests still passing Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
- Comprehensive overview of GMRES implementation - Details on algorithm, parallelization, and testing - Performance characteristics and security considerations - Future enhancement suggestions Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
- Remove unused MIN/MAX macros - Add memory allocation checks in test program - Remove --allow-run-as-root from Makefile (security) - Add note about root execution for containers - All tests still passing Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
- Document all security measures implemented - Address memory safety, input validation, MPI security - Provide security recommendations for users - Confirm no known vulnerabilities - Ready for production use Co-authored-by: chengcli <69489965+chengcli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement a parallel GMRES solver in C
Implement parallel GMRES solver with MPI support
Nov 7, 2025
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.
Adds a standalone GMRES(m) iterative solver for sparse linear systems with MPI parallelization, as requested in the issue referencing the GITM Fortran implementation.
Implementation
Core solver (
src/solver/)MPI_Allreduce)API design
Test program
Build integration
Memory safety
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)https://api.github.com/repos/aaronjridley/GITM/contents/share/Library/srcwget -q REDACTED -O contents.json(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.