Intel oneMKL Scalapack examples

Intel oneAPI / oneMKL includes Scalapack. MKL Scalapack library & include files are under the MKLROOT environment variable for Linux and Windows. Scalapack MKL is used in CMake like:

set(ENABLE_BLACS true)
set(ENABLE_SCALAPACK true)

find_package(MKL CONFIG REQUIRED)

add_executable(mytest main.f90)
target_link_libraries(mytest PRIVATE MKL::MKL)

The exact link flags and compile flags for a particular system are obtained from Intel Link Line Advisor.

Intel MKL Scalapack example project

Netlib Scalapack examples can also be used with non-MKL Scalapack.