Keeping the compatibility with old versions, CPPScaLapack had been totally revised in 2004. The packages released in 2003 are all old model versions of CPPScaLapack. The new CPPScaLapack doesn't have forbidden codes anymore. The "const" keyword works as it is expected in the new CPPScaLapack. It is recommended to update to the newest version. Comprex number support of the new CPPScaLapack is comming soon.
CPPScaLapack is a c++ class wrapper for BLACS, PBLAS and ScaLAPACK.
CPPScaLapack is still an alpha program so far. It is a shame but there are a lot of bugs and unsupported PBLAS and ScaLAPACK functions. If you are going to use CPPScaLapack, please be aware this situation. Of course, it is very nice if you help us to develop CPPScaLapack.
The official distribution site of CPPScaLapack is here.
Actually, you don't need to install CPPScaLapack. CPPScaLapack is a bunch of c++ header files. Just expand the package at somewhere you like, and write a include path in your "Makefile". All you need to include is only "cppscalapack.h" and "cppscalapack_init.h".
But CPPScaLapack needs BLACS, PBLAS and ScaLAPACK installed. Just make sure these libraries are installed and modify "Makefile" to include and link to them.
What BLAS and LAPACK need to link depends on your platform. An examples of "Makefile" for the Score platform is prepared. See typical Makefiles.
A+B;
is not good. For another example, when "dcovector f(const dcovector& x){ return 2*x; }"
, f(x);
is also not good. These are because of "Smart-Temporary" system.
Test programs to check the operations are there in "test" directory. They are also easy examples for you to learn how to use CPPScaLapack.
Some programs to estimate the speed of CPPScaLapack are prepared in "benchmark" directory.
The performance of CPPScaLapack is almost the same as the performance of original PBLAS and ScaLAPACK. However, some of arguments of PBLAS and ScaLAPACK functions such as alpha, beta, Transpose, and so on are fixed at certain values. When you want to make the full-use of PBLAS and ScaLAPACK functions, you can call their functions directory in codes of CPPScaLapack as usual.
(Q)I found my program using CPPScaLapack consuming the memory larger and larger in a loop. Why does this happen?
(A)Most likely, you leave out some returned matrix or vector object in the loop. Please read "Important Specification" section carefully.
(Q)When I print components of a matrix or vector, I sometimes see "nan" printed. What is the possible reason?
(A)First of all, please make sure that your objects are initialized. The constructor with size arguments such as "CPPSL::dgematrix A(5,10);"
does NOT initialize its array components. The "resize" function does NOT initialize, neither. Please initialize objects using substitutions, or use "identity" or "zero" function to initialize them.
(Q)I see a lot of same outputs for each "cout" and "cerr" functions. How can I restrain these annoying outputs?
(A)Use "CPPSL::cout" and "CPPSL::cerr" instead of "std::cout" and "std::cerr". I will see only one output of the 0th node.
CPPScaLapack is an open-source, free, and unguaranteed software.
Author: Yuki ONISHI
Cooperator: Masafumi IAI, Toshiyasu SHIMIZU
Please send bug reports to yuki.onishi@nifty.com. I also welcome any kind of comments.
The sister project of CPPScaLapack:
CPPScaLapack is based on and thanks to: