Commit Graph
7 Commits
Author SHA1 Message Date
Stack-1 241b078e72 ext: fix DIA/HDIA correctness, conversion and storage bugs
1. psb_?_hdia_csmv.f90: with beta /= 0 the kernel scaled y(i) instead of
   y(rdisp+i), so every hack after the first used the wrong element and
   the result was silently wrong. Verified against CSR: the error was
   1.08e+02 on a 1000x1000 tridiagonal test, now 3.6e-15.

2. psb_?_cp_dia_to_coo.f90: the file did not use psi_ext_util_mod, so the
   call to psi_?_xtr_coo_from_dia had no explicit interface and the
   optional rdisp argument was seen as present with a garbage value.
   Any conversion out of DIA crashed. Added the module, as the HDIA
   version already does.

3. psi_?_xtr_coo_from_dia.f90: the extraction wrote one COO entry per
   stored position, padding zeros included, while the caller sizes the
   buffer with get_nzeros(). Skip the zeros, which also keeps the
   round trip DIA -> COO -> DIA exact in the number of nonzeros.
   psb_?_cp_dia_to_coo.f90 now calls set_nzeros with the count that the
   extraction returns.

4. psb_?_cp_hdia_from_coo.f90: diaOffsets holds one integer per diagonal
   per hack, but was allocated with hacksize*iszd, so 31/32 of the array
   was never used. On a 40^3 pdegen matrix the format occupied 5,314,884
   bytes instead of 3,601,204 (-32%); at 500^3 it would waste about
   3.4 GB per process.

5. psb_?_cp_hdia_from_coo.f90: a%nzeros counted the padded positions
   rather than the nonzeros, so get_nzeros() returned 442,222 instead of
   438,400 on the same matrix, inflating the MFLOPS of every benchmark
   and breaking the comparison with the other formats.
2026-10-02 15:17:10 +02:00
sfilippone c77b60e9ef New unrolling for HLL_CSMV 2026-09-09 12:01:02 +02:00
sfilippone 850e0d1cc1 Minor change to HLL 2026-07-14 15:59:32 +02:00
sfilippone d7cb05f371 Define unrolling at 64 for HLL 2026-06-05 15:55:07 +02:00
sfilippone d2fba9e952 Fix licensing text 2026-03-18 14:49:55 +01:00
Salvatore Filippone 67876fec73 Use $(AR) in makefiles merged from EXT 2025-03-02 12:13:56 +01:00
sfilippone 1d5faa388d Merge psblas-ext into psblas, step 1: ext storage formats. 2023-09-27 16:23:17 +02:00