Files
psblas3/Makefile
T
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

116 lines
2.9 KiB
Makefile

include Make.inc
all: dirs mods objs libd
@echo "====================================="
@echo "PSBLAS libraries Compilation Successful."
dirs:
(if test ! -d lib ; then mkdir lib; fi)
(if test ! -d include ; then mkdir include; fi; $(INSTALL_DATA) Make.inc include/Make.inc.psblas)
(if test ! -d modules ; then mkdir modules; fi;)
mods: basemods utilmods precmods linslvmods cbindmods extmods $(CUDAMODS) $(OACCMODS)
basemods:
$(MAKE) -C base mods
precmods: basemods
$(MAKE) -C prec mods
linslvmods: precmods
$(MAKE) -C linsolve mods
utilmods: basemods
$(MAKE) -C util mods
cbindmods: basemods precmods linslvmods utilmods extmods $(CUDAMODS)
$(MAKE) -C cbind objs
extmods: basemods
$(MAKE) -C ext mods
cudamods: extmods
$(MAKE) -C cuda mods
oaccmods: extmods
$(MAKE) -C openacc mods
objs: mods based precd linslvd utild cbindd extd $(CUDAD) $(OACCD)
based: basemods
precd: precmods
utild: utilmods
linslvd: linslvmods
extd: extmods
cudad: cudamods
oaccd: oaccmods
cbindd: cbindmods
libd: based precd linslvd utild cbindd extd $(CUDALD) $(OACCLD)
$(MAKE) -C base lib
$(MAKE) -C prec lib
$(MAKE) -C linsolve lib
$(MAKE) -C util lib
$(MAKE) -C cbind lib
$(MAKE) -C ext lib
cudald: cudad
$(MAKE) -C cuda lib
oaccld: oaccd
$(MAKE) -C openacc lib
based:
$(MAKE) -C base objs
precd:
$(MAKE) -C prec objs
linslvd:
$(MAKE) -C linsolve objs
utild:
$(MAKE) -C util objs
cbindd:
$(MAKE) -C cbind objs
extd:
$(MAKE) -C ext objs
cudad: cudamods
$(MAKE) -C cuda objs
oaccd: oaccmods
$(MAKE) -C openacc objs
install: all
mkdir -p $(INSTALL_INCLUDEDIR) &&\
$(INSTALL_DATA) Make.inc $(INSTALL_INCLUDEDIR)/Make.inc.psblas
mkdir -p $(INSTALL_LIBDIR) &&\
$(INSTALL_DATA) lib/*.a $(INSTALL_LIBDIR)
mkdir -p $(INSTALL_MODULESDIR) && \
$(INSTALL_DATA) modules/*$(.mod) $(INSTALL_MODULESDIR)
mkdir -p $(INSTALL_INCLUDEDIR) && \
$(INSTALL_DATA) include/*.h $(INSTALL_INCLUDEDIR)
mkdir -p $(INSTALL_DOCSDIR) && \
/bin/cp -fr docs/*pdf docs/html $(INSTALL_DOCSDIR)
mkdir -p $(INSTALL_DOCSDIR) && \
$(INSTALL_DATA) README.md LICENSE $(INSTALL_DOCSDIR)
mkdir -p $(INSTALL_SAMPLESDIR) && \
/bin/cp -fr test/pdegen test/fileread $(INSTALL_SAMPLESDIR) && \
mkdir -p $(INSTALL_SAMPLESDIR)/cbind && /bin/cp -fr cbind/test/pdegen/* $(INSTALL_SAMPLESDIR)/cbind
clean: cleanlib
$(MAKE) -C base veryclean
$(MAKE) -C prec veryclean
$(MAKE) -C linsolve veryclean
$(MAKE) -C util veryclean
$(MAKE) -C cbind veryclean
$(MAKE) -C ext veryclean
$(MAKE) -C cuda veryclean
$(MAKE) -C openacc veryclean
cleantest:
cd test/fileread && $(MAKE) clean
cd test/pdegen && $(MAKE) clean
cd test/nested && $(MAKE) clean
cd test/util && $(MAKE) clean
cleanlib:
(cd lib; /bin/rm -f *.a *$(.mod) *$(.fh) *.h)
(cd include; /bin/rm -f *.a *$(.mod) *$(.fh) *.h)
(cd modules; /bin/rm -f *.a *$(.mod) *$(.fh) *.h)
distclean: clean
/bin/rm -f Make.inc util/psb_metis_int.h base/modules/psb_config.h
check: all
make check -C test/serial