Commit Graph

48 Commits (8bd49c43b1c5096fd833a18dd87f48bb23543a4d)

Author SHA1 Message Date
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)
2 weeks ago
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)
2 weeks ago
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)
2 weeks ago
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)
2 weeks ago
jalmerol b8d41569fd Add double-precision nested block-structured matrix/vector layer 3 weeks ago
sfilippone a223c7eaf3 Rebuild I2 supprot 3 months ago
Fabio Durastante 1ee1b83341 Added routine to extract single element from sparse matrix 3 months ago
sfilippone d2fba9e952 Fix licensing text 3 months ago
sfilippone 3337a12e59 Fix multivect handling 5 months ago
sfilippone 0c84efb887 Working version with mods for building with dealii requests 8 months ago
sfilippone 98a6eba948 First round of changes for vector builds 8 months ago
sfilippone ea6c4181f7 Changed all defines with prefix PSB_ 1 year ago
Salvatore Filippone 86b8a261ef Fixed conversion bug, changed SPASB interface 3 years ago
Salvatore Filippone db90270ea7 Fixes for remote_vect handling 4 years ago
Salvatore Filippone fafe128516 Finish vector assembly with REMOTE_BUILD. To be tested. 4 years ago
Salvatore Filippone fc81367fef Changes for remote build interfaces. Implementation to be completed. 4 years ago
Salvatore Filippone 3a2a29c915 First round of changes for remote vector 4 years ago
Salvatore Filippone 6d0b26ecf1 Further changes for remote build, new method 4 years ago
Salvatore Filippone 1337009f91 Infrastructure for non-local matrix build 4 years ago
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
6 years ago
Salvatore Filippone 6a6f6ad2c2 Change name of ICTXT to CTXT 6 years ago
Salvatore Filippone b376d226cb Fixed declaration and use of CONTEXT with new type. 6 years ago
Salvatore Filippone 4bc326d06b Add IDEST to remap interface 6 years ago
Salvatore Filippone fb422be9f4 Change interface of X_REMAP to include isrc/nrsrc 6 years ago
Salvatore Filippone 2090a011db Include X_remap. 6 years ago
Salvatore Filippone 7c6ffcd4a2 Start work on REMAP. 6 years ago
Cirdans-Home 624a07a25b Added getelem function to retrieve entries from distributed vectors 6 years ago
Salvatore Filippone 4c7fa23c8a New files for 2-bytes integer support. To be compiled and tested. 6 years ago
Salvatore Filippone 99dc3f5d93 New par_spmm version with 4-byte matrices (with new sphalo variant) 6 years ago
Salvatore Filippone 76d5c5f3ae Fixes for cases where IPK==LPK 6 years ago
Salvatore Filippone af14080a34 Initial fixes for IPK==LPK 6 years ago
Salvatore Filippone 10f47d731d Define versions of global transpose for IPK matrices 7 years ago
Salvatore Filippone 77542b9023 New global transpose methods 7 years ago
Salvatore Filippone e97cab7ddc Take out N from alloc_vect 7 years ago
Salvatore Filippone 768344d93f Add version of CDINS with lpk NZ 7 years ago
Salvatore Filippone 71059dc783 Version of sphalo for LX_csr. 7 years ago
Salvatore Filippone 40755d6279 New method par_csr_spspmm. 7 years ago
Salvatore Filippone dcedab8ae0 New usehash argument in CDALL. Still need to put in a heuristics for
gen_block with too many cores
7 years ago
Salvatore Filippone 57d08dc4d7 Formatting source code fixes. 7 years ago
Salvatore Filippone 242b9ec91f New variant of psb_spins in CSR mode. Document same. 7 years ago
Salvatore Filippone 2ce1d94580 New RENUM_BLOCK method. 7 years ago
Salvatore Filippone 8d489f8ce2 Merged MixedI8 in new branch (to be later merged into development) 8 years ago
Salvatore Filippone 35da66299a New version of PSB_CDPRT. Must be called by all processes. 9 years ago
Salvatore Filippone c774783057 Updated copyright statement 9 years ago
Salvatore Filippone f1d260b3c9 Added scratch to geasb for arrays. 9 years ago
Salvatore Filippone de0596d677 psblas3:
New affiliation and fix compyright formatting.
9 years ago
Salvatore Filippone de68ae1d64 psblas3:
Modified copyright format for all Fortran file.
9 years ago
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.
10 years ago