Direct computation of all pairwise distances or interactions is a fundamental problem that arises in many application areas including particle or atomistic simulations, fluid dynamics, computational electromagnetics, materials science, genomics and systems biology, and clustering and data mining. Libpnorm is a C/C++ HPC framework for performing such pairwise computations efficiently in parallel on Cell processors. The library overcomes the main limitation of the Cell architecture, i.e. the small size of SPE local store, by a clever scheduling of computations that minimizes the number of DMA transfers. The library has been developed by Jaroslaw Zola, Abhinav Sarje and Srinivas Aluru.
In the current version the library provides full API to run pairwise Lp-norm calculations. To include other kernels (i.e. other functions) certain experience is needed: if you are brave enough to program Cell you have it anyway The library is available under GNU Lesser General Public License version 3 with some components under Boost Software License version 1.0.
The package includes a Doxygen generated API documentation, as well as several comprehensive usage examples.
In the example below, libpnorm is used to compute Lp-norm of degree p between all pairs of n d-dimensional vectors stored in matrix M. The result is stored in matrix D. Computations are carried out in double precision and libpnorm uses all the available SPEs.
#include <pnorm.h> // ... pnorm_init_cbe(PNORM_SPE_AUTO, DOUBLE); std::cout << "number of SPEs: " << pnorm_spe_num_cbe() << std::endl; pnorm_sym_cbe(p, n, d, M, D); pnorm_finalize_cbe();
More examples are included with the source code.
When using libpnorm please cite:
A. Sarje, J. Zola and S. Aluru, “Accelerating Pairwise Computations on Cell Processors”, IEEE Transactions on Parallel and Distributed Systems, 22(1), pp. 69-77, 2011.