Hi can any one provide me an example Makefile for calling ScaLAPACK from C++, I am having difficulties.
I have the newest version compiled correctly with all the tests passed. I have it compiled with GCC and OpenMPI on Fedora, and I have also tried using the pre-built binaries from the repository with no luck.
I used the following declarations for ScaLAPACK procedures:
BLACS procedures are declared in the same way:
I append the “_” character to procedure names, because BLAS and ScaLAPACK were built with -DAdd_ compiler option. This may be different for your system. If so, try
objdump -tonlibscalapack.aand other static library files to determine actual procedure names.Your program with ScaLAPACK calls may be compiled with something like this:
Note that the order of static libraries in g++ invocation line (
-lblacs -lcblacs -lblacs -llapack -lblas -lgfortran) is important! Also check the existance of all these static library files (libblas.a,libcblacs.aand so on) in the library directories. Don’t forget about Fortran package (for-lgfortran).