Files
psblas3/test/comm/swapdata
Stack-1 84d22c8429 [ADD] Build and run the per-type comm test drivers
The four drivers the template generates in each of test/comm/{swapdata,
cg,spmv} were copied into the tree but appeared in no make rule, so they
were never compiled and never run. Only the generic double-precision
driver was built. That is why the complex halo exchange could stay broken
without anyone noticing.

Each Makefile now builds the four typed executables alongside the generic
one, which is kept: psb_spmv_kernel and psb_comm_cg_test are referenced by
the sbatch scripts. clean covers the new objects and executables, and
there are run/run-typed targets with NP and IDIM as before.

In cg and spmv the typed drivers are built CPU-only, without
-DPSB_HAVE_CUDA and without libpsb_cuda. The CUDA layer has no complex
support upstream: psb_?_cuda_vect_mod declares an external cdot/zdot,
which are not BLAS symbols (the complex dots are cdotc/cdotu), and
cuda/Makefile never compiles the c/z hdiag modules. Both are present in
development too, so this is not something the branch introduced. Building
all four the same way also keeps the cross-type comparison honest.

For the two types the CUDA layer does support, 'make gpu' builds
psb_{s,d}_*_gpu variants from the same sources with the CUDA defines and
libraries, into separate objects so switching between the two does not
force a full rebuild; 'make both' does both. The spmv drivers declare a
module, so the GPU build writes its module files to gpumod/ to avoid the
two variants overwriting each other.
2026-08-08 15:02:35 +02:00
..

swapdata communication test

This test was added after introducing different communication schemes in PSBLAS.

It focuses on direct halo exchange through the swapdata path:

  • index list type: halo (psb_comm_halo_)
  • exchange API: psi_swapdata
  • phases: start, wait, and sync (depending on test section)

Communication patterns exercised:

  • baseline point-to-point (isend/irecv)
  • neighbor collective (ineighbor_alltoallv)
  • persistent neighbor collective (persistent_ineighbor_alltoallv)

This test validates the low-level communication behavior in isolation, without the full SpMV overlap pipeline.

Run options

  • Synthetic 3D stencil descriptor (default):
    • ./runs/psb_comm_test [--dim N] [--iters N] [--mode both|baseline|neighbor|persistent]
  • External matrix descriptor:
    • ./runs/psb_comm_test [--iters N] [--mode both|baseline|neighbor|persistent] --matrix <path> [--fmt MM|HB]

With --matrix, the descriptor is built from the distributed input matrix pattern.