Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Using BLACS and ScaLAPACK in c language

phaser75
Beginner
415 Views
I want to use BLACS(not BLAS) and ScaLapack. Since BLACS routines (blacs_pinfo, blacs_gridinit etc.) are Fortran routine, I made my code using mixed-language support. But it doesn't work.
If I want to use them in c language, which library or include files are needed?
I already linked-lmkl_blacs_intelmpi_ilp64 and added #include "mkl.h" in my c code.

0 Kudos
2 Replies
TimP
Honored Contributor III
415 Views
Why not try the link advisor tool on the header page of this forum?
0 Kudos
sozmenproyatech_com
415 Views
Quoting - phaser75
I want to use BLACS(not BLAS) and ScaLapack. Since BLACS routines (blacs_pinfo, blacs_gridinit etc.) are Fortran routine, I made my code using mixed-language support. But it doesn't work.
If I want to use them in c language, which library or include files are needed?
I already linked-lmkl_blacs_intelmpi_ilp64 and added #include "mkl.h" in my c code.



Hi,

first of all, get the list of required libraries from link advisor tool which is located in this forum..
then include mkl_scalapack.h file to get the function prototypes...

and one more thing..for the BLACS funtions like (blacs_pinfo, etc.) use the following scheme of prototypes;

void Cblacs_get (int context, int request, int* value);
void Cblacs_gridinfo (int context, int* np_row, int* np_col, int* my_row, int* my_col);

This way I can call BLACS functions from my c code..

Actually, I dont use mkl_scalapack.h file and define my own declarations as I said above....It is your choice..
0 Kudos
Reply