Skip to content

Conversation

@edvinolo
Copy link
Contributor

Remove the use stdlib_linalg_iterative_solvers statement in the iterative solver implementation submodules. The use statement is not needed since a submodule has access to its parent module via host association. There is also a paragraph in the standard that might disallow this, see e.g. the discussion here: llvm/llvm-project#169863. Flang gives an error for these lines, although apparently not gfortran or ifx.

Along the same lines, the submodules also contain use statements that are already present in the parent module and should therefore be redundant; these could also be removed if you agree.

(@jalvesz @jvdp1 since you have worked on the iterative solvers)

Remove the use stdlib_linalg_iterative_solvers statement in the solver
implementation submodules.
@jalvesz jalvesz changed the title Remove parent module use statement in iterative solver submodules fix: remove parent module use statement in iterative solver submodules Dec 17, 2025
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.69%. Comparing base (34723c7) to head (45b4825).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1073   +/-   ##
=======================================
  Coverage   68.69%   68.69%           
=======================================
  Files         392      392           
  Lines       12693    12693           
  Branches     1377     1377           
=======================================
  Hits         8720     8720           
  Misses       3973     3973           

☔ View full report in Codecov by Sentry.
📢 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.

@jalvesz
Copy link
Contributor

jalvesz commented Dec 19, 2025

Thanks for catching this one @edvinolo! I think this can be merged right away.
I'm curious about how far did you manage to go with compiling stdlib with flang?

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! thank you @edvinolo

@jalvesz jalvesz merged commit 572c289 into fortran-lang:master Dec 21, 2025
38 of 39 checks passed
@edvinolo edvinolo deleted the remove-mod-use-in-smod branch December 23, 2025 01:05
@edvinolo
Copy link
Contributor Author

@jalvesz With the version of flang-21 on Homebrew for Linux, I was able to compile most of stdlib as is (with only sp and dp enabled). The problems I ran into, other than the one addressed by this PR, were: llvm/llvm-project#169590, and then some of the tests were failing due to this issue: llvm/llvm-project#170331.

I have also tried with a fairly recent development version of flang-22 (also with xdp and qp enabled), but then it crashes when compiling some tests and examples, I think due to an issue with derived type I/O for the string type. I haven't filed an issue in the llvm repo yet. If I skip the tests where flang crashes, then everything compiles, and all the remaining tests pass.

I have to use make as the build backend, if I use ninja with flang, it tries to build some of the files out of order.

@jalvesz
Copy link
Contributor

jalvesz commented Dec 23, 2025

Brilliant! thanks for the info, looking forward for progress on this

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.

3 participants