Commit Graph
49 Commits
Author SHA1 Message Date
Stack-1 87eca22895 [WIP] RMA swapdata optimization, nest builder updates, GPU/scorep test tooling
- psi_dswapdata / psb_comm_rma: RMA swapdata optimization (PSCW + Win_allocate)
- psb_d_nest_builder: builder updates
- cuda: Makefile + psb_d_cuda_vect_mod adjustments
- test/comm: spmv/cg drivers, Makefiles, GPU + scorep/strong-scaling scripts
- test/nested: halo-regime test + Makefile/CMake updates
2026-07-05 15:01:43 +02:00
Stack-1 e1d759d019 [ADD] Generate the nested matrix support for s/c/z from the templates
Extend the nested (MATNEST) matrix support to all the arithmetics: the
psb_{s,c,z}_nest_{mat,base_mat,tools,builder}_mod modules and the
psb_{s,c,z}_nest_mod umbrellas are generated from the template-psblas
X_nest_* templates; the d sources are regenerated byte-identical.

Preparatory changes to the d sources for clean templating: rowsum/arwsum and
colsum/aclsum no longer share a helper (for the complex arithmetics the
absolute sums are real-valued while the plain sums are complex-valued), the
transposed kernel forwards the actual 'T'/'C' character to the blocks
(conjugate transpose for the complex types), and the capacity helper takes a
type-neutral name.

Build hooks (autotools Makefile and CMakeLists) updated with the per-arith
objects, compile rules and dependencies.  All four d tests keep passing.

Author: Simone Staccone (Stack-1)
2026-06-13 01:58:38 +02:00
Stack-1 fd60bb8d7f [UPDATE] User-friendly row queries on the nested matrix
Add get_owned_rows(i_field) and get_owned_row_count(i_field) to
psb_d_nest_matrix: the list of GLOBAL row indices of a field owned by the
calling process (i.e. the rows it is expected to insert through ins) and
their count.  They replace the descriptor-level idiom
field_desc(i)%get_local_rows() / field_desc(i)%l2g(...) in user code, which
leaked descriptor jargon into the build loop.

The high-level tests (glob, rect, builder) are rewritten on the new queries;
the low-level CG test intentionally keeps the descriptor path.  README updated
with the new queries and an example.

Author: Simone Staccone (Stack-1)
2026-06-12 20:24:06 +02:00
Stack-1 8e02a99a11 [ADD] Stock preconditioners, configurable block format and full base-class contract for the nested matrix
Complete the integration of the nested (MATNEST) operator into the standard
PSBLAS infrastructure:

- Preconditioners: implement get_diag and csgetrow on psb_d_nest_base_mat so
  the stock one-level preconditioners build directly on the nested operator
  (DIAG through the concatenated block diagonals, BJAC through the
  format-agnostic csget path used by the ILU factorizations).

- Configurable block storage: psb_d_nest_rect_block and psb_d_nest_matrix%asb
  accept an optional type ('CSR' default, 'CSC', 'COO') or mold (any class
  extending psb_d_base_sparse_mat, e.g. the psb_ext ELL/HLL formats); the
  operator is format-agnostic since every operation delegates to the blocks.

- Device-capable matvec: override vect_mv to gather/scatter through the
  vectors' own gth/sct with encapsulated index vectors (device kernels on
  device vectors) and to run each block through its vect_mv, so device block
  formats execute their native kernels; bit-equivalent to csmv on host.

- Full psb_d_base_sparse_mat contract by delegation to the blocks: transposed
  csmv (dedicated kernel, ghost contributions left to the transposed halo
  exchange), multi-RHS csmm, cp_to_coo/mv_to_coo (unlocking cscnv, csclip,
  tril/triu through the base generics), rowsum/arwsum/colsum/aclsum,
  maxval/spnmi/spnm1, scal (left/right) and scals, clone (view semantics:
  shared blocks, re-owned index maps), mold, sizeof.  cp_from_coo/mv_from_coo,
  csput and cssv/cssm are intentionally left to the base error (meaningless
  for a block-operator view), documented in the type and in the README.

Tests: glob assembles the blocks in HLL (psb_ext) and rect in CSC, both still
bit-identical to the monolithic CSR oracle; the CG test solves under NONE,
DIAG and BJAC/ILU(0), requiring convergence to the exact solution for all of
them and DIAG bit-identical to NONE (exactness check of the nested get_diag).
README updated with the user API reference, the preconditioner section and
the implemented-contract section.

Author: Simone Staccone (Stack-1)
2026-06-12 19:50:40 +02:00
Stack-1 acdd2e9eb5 [ADD] Nested (MATNEST-style) block matrix support and tests
Add a block-structured distributed operator that presents itself to Krylov
solvers and preconditioners as a single ordinary distributed matrix (the
PSBLAS analogue of PETSc MATNEST), targeting saddle-point systems
M = [[A, B^T], [B, 0]] with possibly rectangular sub-blocks.

Library (base/modules):
- psb_desc_nest_mod, psb_d_nest_mat_mod: grid of per-field descriptors and
  per-block sparse storage.
- psb_d_nest_base_mat_mod: psb_d_nest_base_mat, the operator extending
  psb_d_base_sparse_mat (local csmv, free, field-split hooks for a future
  block preconditioner).
- psb_cd_nest_tools_mod / psb_d_nest_tools_mod: composed global descriptor
  with union halo (psb_cd_nest_compose) and rectangular local block builder
  (psb_d_nest_rect_block), plus the per-block assembly wrappers.
- psb_d_nest_builder_mod: psb_d_nest_matrix, the user frontend with the
  init/ins/asb/free pattern hiding all descriptor/halo/compose/setup
  boilerplate.
- psb_d_nest_mod: umbrella module (use psb_d_nest_mod).

Remove the earlier bespoke per-block prototype (comm/psblas/vect modules and
the pde_nest_psblas test) superseded by the single MATNEST design.

Tests (test/nested): glob (square operator vs monolithic CSR oracle), rect
(genuinely rectangular blocks), cg (low-level path, ill-conditioned SPD
red-black Laplacian solved with standard CG), builder (same solve via the
utility), plus a README describing the design and usage. All pass serially
and in parallel, with results invariant to the process count.

Build hooks updated (autotools Makefiles + CMakeLists); the nested tests are
relocated out of test/pdegen into test/nested.

Author: Simone Staccone (Stack-1)
2026-06-11 16:53:46 +02:00
jalmerol b8d41569fd Add double-precision nested block-structured matrix/vector layer 2026-06-05 00:27:41 +02:00
sfilippone a223c7eaf3 Rebuild I2 supprot 2026-03-24 15:42:12 +01:00
fdurastante 1ee1b83341 Added routine to extract single element from sparse matrix 2026-03-19 14:58:00 +01:00
sfilippone d2fba9e952 Fix licensing text 2026-03-18 14:49:55 +01:00
sfilippone 3337a12e59 Fix multivect handling 2026-01-13 15:26:11 +01:00
sfilippone 0c84efb887 Working version with mods for building with dealii requests 2025-11-06 14:06:47 +01:00
sfilippone 98a6eba948 First round of changes for vector builds 2025-11-05 14:01:54 +01:00
sfilippone ea6c4181f7 Changed all defines with prefix PSB_ 2025-03-14 12:54:18 +01:00
Salvatore Filippone 86b8a261ef Fixed conversion bug, changed SPASB interface 2023-01-19 08:36:22 -05:00
Salvatore Filippone db90270ea7 Fixes for remote_vect handling 2022-06-03 10:41:25 +02:00
Salvatore Filippone fafe128516 Finish vector assembly with REMOTE_BUILD. To be tested. 2022-04-01 17:59:54 +02:00
Salvatore Filippone fc81367fef Changes for remote build interfaces. Implementation to be completed. 2022-04-01 11:38:40 +02:00
Salvatore Filippone 3a2a29c915 First round of changes for remote vector 2022-03-30 09:47:56 -04:00
Salvatore Filippone 6d0b26ecf1 Further changes for remote build, new method 2022-02-03 13:25:51 +01:00
Salvatore Filippone 1337009f91 Infrastructure for non-local matrix build 2022-02-01 10:56:06 +01:00
Salvatore Filippone 7124e8abdf Merge branch 'new-context' into remap-coarse & fix
# Conflicts:
#	base/modules/desc/psb_desc_mod.F90
#	base/modules/penv/psi_penv_mod.F90
2020-11-19 14:38:48 +01:00
Salvatore Filippone 6a6f6ad2c2 Change name of ICTXT to CTXT 2020-11-16 16:15:48 +01:00
Salvatore Filippone b376d226cb Fixed declaration and use of CONTEXT with new type. 2020-11-14 16:42:15 +01:00
Salvatore Filippone 4bc326d06b Add IDEST to remap interface 2020-11-09 10:16:57 +01:00
Salvatore Filippone fb422be9f4 Change interface of X_REMAP to include isrc/nrsrc 2020-11-08 12:38:15 +01:00
Salvatore Filippone 2090a011db Include X_remap. 2020-11-06 16:08:54 +01:00
Salvatore Filippone 7c6ffcd4a2 Start work on REMAP. 2020-11-06 09:33:27 +01:00
Cirdans-Home 624a07a25b Added getelem function to retrieve entries from distributed vectors 2020-09-24 12:40:13 +02:00
Salvatore Filippone 4c7fa23c8a New files for 2-bytes integer support. To be compiled and tested. 2020-04-02 10:27:49 +02:00
Salvatore Filippone 99dc3f5d93 New par_spmm version with 4-byte matrices (with new sphalo variant) 2020-02-26 18:56:06 +00:00
Salvatore Filippone 76d5c5f3ae Fixes for cases where IPK==LPK 2020-02-02 15:24:16 +00:00
Salvatore Filippone af14080a34 Initial fixes for IPK==LPK 2020-02-02 11:37:53 +00:00
Salvatore Filippone 10f47d731d Define versions of global transpose for IPK matrices 2020-01-25 11:10:33 +00:00
Salvatore Filippone 77542b9023 New global transpose methods 2020-01-25 09:25:31 +00:00
Salvatore Filippone e97cab7ddc Take out N from alloc_vect 2019-12-15 18:36:34 +00:00
Salvatore Filippone 768344d93f Add version of CDINS with lpk NZ 2019-09-19 15:53:23 +01:00
Salvatore Filippone 71059dc783 Version of sphalo for LX_csr. 2019-09-13 13:58:42 +01:00
Salvatore Filippone 40755d6279 New method par_csr_spspmm. 2019-09-08 16:52:20 +01:00
Salvatore Filippone dcedab8ae0 New usehash argument in CDALL. Still need to put in a heuristics for
gen_block with too many cores
2019-08-01 14:56:48 +01:00
Salvatore Filippone 57d08dc4d7 Formatting source code fixes. 2019-07-09 13:29:53 +01:00
Salvatore Filippone 242b9ec91f New variant of psb_spins in CSR mode. Document same. 2019-05-28 15:48:53 +01:00
Salvatore Filippone 2ce1d94580 New RENUM_BLOCK method. 2019-02-20 09:39:39 +00:00
Salvatore Filippone 8d489f8ce2 Merged MixedI8 in new branch (to be later merged into development) 2018-12-10 11:42:40 +00:00
Salvatore Filippone 35da66299a New version of PSB_CDPRT. Must be called by all processes. 2018-02-05 11:52:21 +00:00
Salvatore Filippone c774783057 Updated copyright statement 2018-01-28 09:28:57 +00:00
Salvatore Filippone f1d260b3c9 Added scratch to geasb for arrays. 2017-09-21 15:57:55 +01:00
Salvatore Filippone de0596d677 psblas3:
New affiliation and fix compyright formatting.
2017-04-03 15:56:11 +00:00
Salvatore Filippone de68ae1d64 psblas3:
Modified copyright format for all Fortran file.
2017-03-23 11:34:29 +00:00
Salvatore Filippone c3813ad217 psblas3:
base/modules/Makefile
 base/modules/aux
 base/modules/aux/psb_c_sort_mod.f90
 base/modules/aux/psb_d_sort_mod.f90
 base/modules/aux/psb_hash_mod.f90
 base/modules/aux/psb_i_sort_mod.f90
 base/modules/aux/psb_ip_reord_mod.f90
 base/modules/aux/psb_s_sort_mod.f90
 base/modules/aux/psb_sort_mod.f90
 base/modules/aux/psb_string_mod.f90
 base/modules/aux/psb_z_sort_mod.f90
 base/modules/aux/psi_c_serial_mod.f90
 base/modules/aux/psi_d_serial_mod.f90
 base/modules/aux/psi_i_serial_mod.f90
 base/modules/aux/psi_s_serial_mod.f90
 base/modules/aux/psi_serial_mod.f90
 base/modules/aux/psi_z_serial_mod.f90
 base/modules/comm
 base/modules/comm/psb_base_linmap_mod.f90
 base/modules/comm/psb_c_comm_mod.f90
 base/modules/comm/psb_c_linmap_mod.f90
 base/modules/comm/psb_comm_mod.f90
 base/modules/comm/psb_d_comm_mod.f90
 base/modules/comm/psb_d_linmap_mod.f90
 base/modules/comm/psb_i_comm_mod.f90
 base/modules/comm/psb_linmap_mod.f90
 base/modules/comm/psb_s_comm_mod.f90
 base/modules/comm/psb_s_linmap_mod.f90
 base/modules/comm/psb_z_comm_mod.f90
 base/modules/comm/psb_z_linmap_mod.f90
 base/modules/desc
 base/modules/desc/psb_desc_const_mod.f90
 base/modules/desc/psb_desc_mod.F90
 base/modules/desc/psb_gen_block_map_mod.f90
 base/modules/desc/psb_glist_map_mod.f90
 base/modules/desc/psb_hash_map_mod.f90
 base/modules/desc/psb_indx_map_mod.f90
 base/modules/desc/psb_list_map_mod.f90
 base/modules/desc/psb_repl_map_mod.f90
 base/modules/psb_base_linmap_mod.f90
 base/modules/psb_base_mat_mod.f90
 base/modules/psb_c_base_mat_mod.f90
 base/modules/psb_c_base_vect_mod.f90
 base/modules/psb_c_comm_mod.f90
 base/modules/psb_c_csc_mat_mod.f90
 base/modules/psb_c_csr_mat_mod.f90
 base/modules/psb_c_linmap_mod.f90
 base/modules/psb_c_mat_mod.f90
 base/modules/psb_c_psblas_mod.F90
 base/modules/psb_c_serial_mod.f90
 base/modules/psb_c_sort_mod.f90
 base/modules/psb_c_tools_mod.f90
 base/modules/psb_c_vect_mod.F90
 base/modules/psb_cd_tools_mod.f90
 base/modules/psb_comm_mod.f90
 base/modules/psb_d_base_mat_mod.f90
 base/modules/psb_d_base_vect_mod.f90
 base/modules/psb_d_comm_mod.f90
 base/modules/psb_d_csc_mat_mod.f90
 base/modules/psb_d_csr_mat_mod.f90
 base/modules/psb_d_linmap_mod.f90
 base/modules/psb_d_mat_mod.f90
 base/modules/psb_d_psblas_mod.F90
 base/modules/psb_d_serial_mod.f90
 base/modules/psb_d_sort_mod.f90
 base/modules/psb_d_tools_mod.f90
 base/modules/psb_d_vect_mod.F90
 base/modules/psb_desc_const_mod.f90
 base/modules/psb_desc_mod.F90
 base/modules/psb_gen_block_map_mod.f90
 base/modules/psb_glist_map_mod.f90
 base/modules/psb_hash_map_mod.f90
 base/modules/psb_hash_mod.f90
 base/modules/psb_i_base_vect_mod.f90
 base/modules/psb_i_comm_mod.f90
 base/modules/psb_i_sort_mod.f90
 base/modules/psb_i_tools_mod.f90
 base/modules/psb_i_vect_mod.F90
 base/modules/psb_indx_map_mod.f90
 base/modules/psb_ip_reord_mod.f90
 base/modules/psb_linmap_mod.f90
 base/modules/psb_list_map_mod.f90
 base/modules/psb_mat_mod.f90
 base/modules/psb_psblas_mod.f90
 base/modules/psb_repl_map_mod.f90
 base/modules/psb_s_base_mat_mod.f90
 base/modules/psb_s_base_vect_mod.f90
 base/modules/psb_s_comm_mod.f90
 base/modules/psb_s_csc_mat_mod.f90
 base/modules/psb_s_csr_mat_mod.f90
 base/modules/psb_s_linmap_mod.f90
 base/modules/psb_s_mat_mod.f90
 base/modules/psb_s_psblas_mod.F90
 base/modules/psb_s_serial_mod.f90
 base/modules/psb_s_sort_mod.f90
 base/modules/psb_s_tools_mod.f90
 base/modules/psb_s_vect_mod.F90
 base/modules/psb_serial_mod.f90
 base/modules/psb_sort_mod.f90
 base/modules/psb_sort_mod_save.f90
 base/modules/psb_string_mod.f90
 base/modules/psb_tools_mod.f90
 base/modules/psb_vect_mod.f90
 base/modules/psb_z_base_mat_mod.f90
 base/modules/psb_z_base_vect_mod.f90
 base/modules/psb_z_comm_mod.f90
 base/modules/psb_z_csc_mat_mod.f90
 base/modules/psb_z_csr_mat_mod.f90
 base/modules/psb_z_linmap_mod.f90
 base/modules/psb_z_mat_mod.f90
 base/modules/psb_z_psblas_mod.F90
 base/modules/psb_z_serial_mod.f90
 base/modules/psb_z_sort_mod.f90
 base/modules/psb_z_tools_mod.f90
 base/modules/psb_z_vect_mod.F90
 base/modules/psblas
 base/modules/psblas/psb_c_psblas_mod.F90
 base/modules/psblas/psb_d_psblas_mod.F90
 base/modules/psblas/psb_psblas_mod.f90
 base/modules/psblas/psb_s_psblas_mod.F90
 base/modules/psblas/psb_z_psblas_mod.F90
 base/modules/psi_c_serial_mod.f90
 base/modules/psi_d_serial_mod.f90
 base/modules/psi_i_serial_mod.f90
 base/modules/psi_s_serial_mod.f90
 base/modules/psi_serial_mod.f90
 base/modules/psi_z_serial_mod.f90
 base/modules/serial
 base/modules/serial/psb_base_mat_mod.f90
 base/modules/serial/psb_c_base_mat_mod.f90
 base/modules/serial/psb_c_base_vect_mod.f90
 base/modules/serial/psb_c_csc_mat_mod.f90
 base/modules/serial/psb_c_csr_mat_mod.f90
 base/modules/serial/psb_c_mat_mod.f90
 base/modules/serial/psb_c_serial_mod.f90
 base/modules/serial/psb_c_vect_mod.F90
 base/modules/serial/psb_d_base_mat_mod.f90
 base/modules/serial/psb_d_base_vect_mod.f90
 base/modules/serial/psb_d_csc_mat_mod.f90
 base/modules/serial/psb_d_csr_mat_mod.f90
 base/modules/serial/psb_d_mat_mod.f90
 base/modules/serial/psb_d_serial_mod.f90
 base/modules/serial/psb_d_vect_mod.F90
 base/modules/serial/psb_i_base_vect_mod.f90
 base/modules/serial/psb_i_vect_mod.F90
 base/modules/serial/psb_mat_mod.f90
 base/modules/serial/psb_s_base_mat_mod.f90
 base/modules/serial/psb_s_base_vect_mod.f90
 base/modules/serial/psb_s_csc_mat_mod.f90
 base/modules/serial/psb_s_csr_mat_mod.f90
 base/modules/serial/psb_s_mat_mod.f90
 base/modules/serial/psb_s_serial_mod.f90
 base/modules/serial/psb_s_vect_mod.F90
 base/modules/serial/psb_serial_mod.f90
 base/modules/serial/psb_vect_mod.f90
 base/modules/serial/psb_z_base_mat_mod.f90
 base/modules/serial/psb_z_base_vect_mod.f90
 base/modules/serial/psb_z_csc_mat_mod.f90
 base/modules/serial/psb_z_csr_mat_mod.f90
 base/modules/serial/psb_z_mat_mod.f90
 base/modules/serial/psb_z_serial_mod.f90
 base/modules/serial/psb_z_vect_mod.F90
 base/modules/tools
 base/modules/tools/psb_c_tools_mod.f90
 base/modules/tools/psb_cd_tools_mod.f90
 base/modules/tools/psb_d_tools_mod.f90
 base/modules/tools/psb_i_tools_mod.f90
 base/modules/tools/psb_s_tools_mod.f90
 base/modules/tools/psb_tools_mod.f90
 base/modules/tools/psb_z_tools_mod.f90
 configure.ac
 configure

Mreged reorganization of the base/modules subdir from newdesc branch.
2016-06-03 12:51:59 +00:00