feat(sparse): add BSR format and rebase sparse_bsr onto fortran-lang/stdlib master - #11
Conversation
…ng#1180) * split sparse_spmv into module submodules * cleanup unrelated changes * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove residual change * revert to plain do loops * fix indexing issue * Remove extra blank line in stdlib_sparse_kinds.fypp * add fixes to CSC format * make reference arrays in test static Co-authored-by: Copilot <copilot@github.com> * Update test/linalg/test_linalg_sparse.fypp Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com> * Update test/linalg/test_linalg_sparse.fypp Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
…sion (fortran-lang#1191) * Initial plan * Fix fpm-deployment CI: pin action versions and fix lcov example exclusion - Pin fortran-lang/setup-fortran@main to @v1.6.2 in both deploy and coverage jobs to avoid breakages from HEAD changes - Update actions/checkout@v2.3.1 -> @v4 and setup-python@v1 -> @v5 in deploy job to use current supported versions - Fix lcov --remove pattern for example file exclusion: * lcov 2.x (Ubuntu 24.04) changed * glob to NOT match / * The old pattern */example/* only matched absolute paths with one path component before example and one after (not recursive) * fpm stores source paths as relative (e.g. example/ascii/file.f90), which the old pattern never matched * Add example/** to cover relative paths at any depth * Add --ignore-errors unused,mismatch to handle edge cases This ensures example programs (compiled but never run by fpm test) are excluded from the coverage denominator, preventing newly-added examples from diluting the stdlib source coverage metric. * Update setup-fortran action and lcov error handling Updated setup-fortran action to use the main branch and modified lcov command to ignore 'inconsistent' errors. * Change Fortran setup action to version 1.6.2 Updated Fortran setup action to version 1.6.2 in deployment workflow. * Refactor fpm deployment workflow for coverage testing Removed xdp and qp checks from deployment workflow and updated coverage testing. * Refine fpm-deployment workflow configuration Updated workflow triggers and added concurrency settings. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: José Alves <102541118+jalvesz@users.noreply.github.com>
…ran-lang#1190) Fixing fortran-lang#1189 Co-authored-by: Cyril Gandon <cyril.gandon@inrae.fr>
* Add CI workflow for Flang with CMake and tests * Initial plan * Fix CI_Flang workflow: use minhqdao/setup-fortran action for flang/clang toolchain * ci_flang: replace flang-18 with flang-22 in version matrix * ci_flang: use single latest toolchain and Unix Makefiles generator * Fix two flang test failures: allocatable d in test_matmul, relax g0 format prefix checks * Update CI workflow for Flang and Clang setup clean-up merge * Update .github/workflows/ci_flang.yml Co-authored-by: Ivan Pribec <ivan.pribec@gmail.com> * Apply suggestion from @ivan-pi Co-authored-by: Ivan Pribec <ivan.pribec@gmail.com> * Remove CTEST_OUTPUT_ON_FAILURE from CI config Remove CTEST_OUTPUT_ON_FAILURE environment variable as it is defined in the command line. * Change FIND_BLAS type from STRING to BOOL * Refine CI workflow for branch and concurrency Updated CI workflow to specify branch for push events and added concurrency settings. * Rename setup step for Flang in CI workflow * Add Flang LLVM to compatibility list --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Ivan Pribec <ivan.pribec@gmail.com>
- Add BSR_type to stdlib_sparse_kinds - Add spmv_bsr implementation in new stdlib_sparse_spmv_bsr.fypp - Register stdlib_sparse_spmv_bsr.fypp in CMakeLists.txt - Add BLAS linkage to sparse target - Update spmv interface with BSR subroutine declarations - Update COO spmv to use do concurrent with entry_index naming - Add BSR documentation to stdlib_sparse.md - Add BSR tests to test_linalg_sparse.fypp Rebased onto fortran-lang/stdlib master (0e45050)
|
@copilot resolve the merge conflicts in this pull request. current changes have priority over stalled branch. |
# Conflicts: # src/sparse/stdlib_sparse_spmv_coo.fypp # src/sparse/stdlib_sparse_spmv_csc.fypp # src/sparse/stdlib_sparse_spmv_ell.fypp
Merged |
|
@copilot there seem to be errors in the merge, can you check the CI logs and fix ? we want to be as close as possible to fortran-lang/stdlib:master to minimize differences |
Fixed in commit |
sparse_bsrwas 4 commits behind and 18 commits ahead offortran-lang/stdlib:master. This rebases the BSR work cleanly onto the current upstream HEAD (0e450504).Changes
BSR_type— extendssparse_typewithblock_shape(2),col,rowptrarrays and amallocprocedurestdlib_sparse_spmv_bsr.fypp— full SpMV implementation for BSR format (all real/complex kinds, rank-1 and rank-2 vectors,none/transpose/hermitianops)stdlib_sparse_spmv.fypp— adds BSR subroutine interface declarations in the module interface blockCMakeLists.txt— registersstdlib_sparse_spmv_bsr.fyppand adds_blaslinkage to the sparse targetstdlib_sparse.md— documents the newaddoverloads for BSR (single block and block-of-blocks)test_linalg_sparse.fypp— BSR construction and SpMV testsConflict resolutions (4 commits that landed upstream since the branch diverged)
Upstream split monolithic
stdlib_sparse_spmv.fyppinto per-format submodules. Conflicts arose where both sides created the same new files differently:stdlib_sparse_spmv_coo.fyppdo concurrent+entry_indexrenamestdlib_sparse_spmv_csc.fyppcolptr(i+1)(loop-variable bug) and inverted accumulation indices insparse_uppercasestdlib_sparse_spmv_ell.fyppdo concurrent (i,k)with sharedvec_y(i)writes acrossk, which is a data race