The finite-element (FE) discretization of a partial differential equation
usually involves the construction of a FE discretized operator and computing
its action on trial FE discretized fields for the solution of a linear system
of equations or eigenvalue problems and is traditionally computed using global
sparse-vector multiplication modules. However, recent hardware-aware algorithms
for evaluating such matrix-vector multiplications suggest that on-the-fly
matrix-vector products without building and storing the cell-level dense
matrices reduce both arithmetic complexity and memory footprint and are
referred to as matrix-free approaches. These approaches exploit the
tensor-structured nature of the FE polynomial basis for evaluating the
underlying integrals and, the current state-of-the-art matrix-free
implementations deal with the action of FE discretized matrix on a single
vector. These are neither optimal nor readily applicable for matrix-multivector
products involving a large number of vectors. We discuss a computationally
efficient and scalable matrix-free implementation procedure to compute the FE
discretized matrix-multivector products on multi-node CPU and GPU
architectures. The accuracy and performance of our implementation is assessed
on the problem of computing FE overlap (mass) matrix-multivector
multiplications as a representative benchmark example, and we observe superior
performance of our implementation. For instance, computational gains up to 2.9x
on GPU architectures and 6x on CPU-only architectures are observed for
matrix-multivector products compared to the FE cell-level matrix-multiplication
approach for the case of 100 vectors. We further benchmark our performance
against the matrix-free module in deal.II and speedups up to 2x are observed
for multivectors on CPU-only architectures and 1.5x on GPUs.Comment: 5 pages, 7 figure