mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-07 07:04:57 +00:00
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.