Skip to content

Add C and Fortran interfaces - #341

Draft
amontoison wants to merge 6 commits into
c_interfacefrom
c_fortran_interfaces
Draft

Add C and Fortran interfaces#341
amontoison wants to merge 6 commits into
c_interfacefrom
c_fortran_interfaces

Conversation

@amontoison

@amontoison amontoison commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

close #329

The PR enables the compilation of SMC.jl as a "standalone" shared library that can be called from C or Fortran.
The implementation of the interfaces is highly based on what was done in Krylov.jl.

The PR contains new C, Fortran and Julia tests.
The Julia tests are directly on the @ccallable, which is quite different to what we do in SMC.jl.
A few C / Fortran examples are also provided.

We will probably need to discuss about the C API and what we want to expose but let's first see if the current CI tests for the "proof-of-concept" are passing.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.20%. Comparing base (f177507) to head (2484fdb).

Additional details and impacted files
@@               Coverage Diff               @@
##           c_interface     #341      +/-   ##
===============================================
+ Coverage        97.61%   99.20%   +1.59%     
===============================================
  Files               21       21              
  Lines             2219     2151      -68     
===============================================
- Hits              2166     2134      -32     
+ Misses              53       17      -36     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amontoison

amontoison commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

@gdalle @adrhill
The C and Fortran tests passed on all platforms 🎉 https://github.com/JuliaDiff/SparseMatrixColorings.jl/actions/runs/33947638484?pr=341

I need to polish and simplify the code, without AI, such that it can be read by anyone.
I will convert the PR to draft until it's clean enough for a review.

@amontoison
amontoison marked this pull request as draft September 5, 2026 05:47
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