Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Where is BLACS in the MKL?

schmmd
Beginner
349 Views
I am trying to use BLACS from Visual Studio to use ScaLapack functions. However, I cannot find the blacs functions anywhere in the header files. They do exist in the DLLs, however. How am I supposed to call them from C/C++?
0 Kudos
7 Replies
ArturGuzik
Valued Contributor I
349 Views
Quoting - schmmd
I am trying to use BLACS from Visual Studio to use ScaLapack functions. However, I cannot find the blacs functions anywhere in the header files. They do exist in the DLLs, however. How am I supposed to call them from C/C++?

I don't entirely understand what you're trying to do but you'll get CBLAS by linking to mkl_core.lib. You will find header file(s) in include folder.

The word of warning, be aware that CBLAS is C interface to BLAS (written in FORTRAN) so you'll have some issues to resolve/address.


A.
sathya_
Beginner
349 Views

schmmd,

Assuming you are talking about CBLAS,

  • the header file is mkl_cblas.h
  • You can either call the FORTRAN functions directly from C/C++ (or) use the C interface functions provided in CBLAS to call the functions. I personally find the C interface functions easier to call, but the FORTRAN interfaces also work when called directly from C/C++.
What functions are you trying to call?
Todd_R_Intel
Employee
349 Views
Quoting - schmmd
I am trying to use BLACS from Visual Studio to use ScaLapack functions.
Most people use ScaLAPACK and the use of BLACS underneath is largely invisible to them. I don't think I've heard a request for BLACS headers , but we have documented them in our reference manual now, so it would seem natural to have the headers. I'll see what I can find.

-Todd
Customer__Intel4
Beginner
349 Views
Hi Todd
After 2.5 years of your reply, I still can't find any c interface to the BLACS in the MKL refrence manual ? For some one who wants to use PBLAS, in c++ using MKL, does CBLACS exist in MKL or not?
Tarek
Todd_R_Intel
Employee
349 Views
Hello Tarek,

After 2.5 years, we have included a C header file (mkl_blacs.h)which should make it easier to directly use the BLACS from C++. We don't have a C interface, so you'll need to make the necessary adjustments for calling functions written in Fortran. The header file might help you.

Is there a particular BLACS function that interests you? WhycallBLACS functions from your app for communication rather than using MPI?

Todd

Customer__Intel4
Beginner
349 Views
WhycallBLACS functions from your app for communication rather than using MPI?

Todd

Thanks Todd for the reply,
you mean that I can use normal MPI functions with PBLAS instead of BLACS functions?

Todd_R_Intel
Employee
349 Views

Tarek, Here's what I mean:

It sounds like you have a C++ application and you want to use PBLAS. Everything should work just fine for you to do so without even considering the question of the existence of the BLACS for the C++ user. The BLACS are there in Intel MKLand the PBLAS that are in Intel MKL should call them correctly without any direct interaction with your C++ application. In my (somewhat limited) experience I haven't seen people using the BLACS directly (from C++ or Fortran).

Now if you do need some communication in your application---outside of, or in support of your use of the PBLAS---then we'd expect you to use MPI communication functions rather than using the BLACS.

But, if I've missed something let us know a little more about your direct use of theBLACS.

Todd

Reply