ScaLAPACK for Windows

What do you need?

To download ScaLAPACK libraries for Windows?
Please refer to the libraries section

To run a program calling a ScaLAPACK routine under Windows?
Please follow this guide.

To build ScaLAPACK under Windows?
Please refer to the install section

To see and run examples of calling ScaLAPACK from C++ on Windows HPC Server 2008 R2 with Microsoft MPI?
This sample, written and documented by Sudarshan Raghunathan, provides simple, self-contained example programs in C++ that illustrate the use of representative routines in ScaLAPACK on Windows HPC Server 2008 R2 with Microsoft MPI (MS MPI). ScaLAPACK is a widely used FORTRAN 77 library for performing distributed-memory linear algebra computations. The programs solve commonly occurring problems in dense linear algebra such as matrix multiplication and the solution of symmetric and unsymmetric linear systems. Moreā€¦

Prebuilt libraries

Information: Those libraries were built under Visual Studio 2008.
No debug
  • x64
  • win32
  • x64
  • win32
  • x64 BLACS BLACS_Cinit BLACS_Finit
  • win32 BLACS BLACS_Cinit BLACS_Finit
  • x64
  • win32
  • Debug
  • x64
  • win32
  • x64
  • win32
  • x64 BLACS BLACS_Cinit BLACS_Finit
  • win32 BLACS BLACS_Cinit BLACS_Finit
  • x64
  • win32
  • Running ScaLAPACK under Windows

    Part 1: Getting a BLAS library

    LAPACK is designed as a two-tiered Fortran library, comprising higher level subroutines and "lower-level Basic Linear Algebra Subprograms (BLAS) in order to effectively exploit the caches on modern cache-based architectures" ( ). For reference purposes, the LAPACK installation provides a(n untuned) version of the BLAS which is not optimized for any architecture. This reference BLAS implementation may be orders of magnitude slower than optimized implementations, for matrix factorizations and other computationally intensive matrix operations. Optimized implementations the BLAS are available from a number of vendors and projects such as: Intel (commercial), AMD, ATLAS, and GotoBLAS.

    Part 1-a: Using the Reference BLAS

    The Reference BLAS for Windows can be downloaded here .

    Part 1-b: Using the MKL BLAS

    MKL -

    Part 1-b: Using the ACML BLAS

    AMD (AMCL) -- ... fault.aspx

    Part 1-c: Using ATLAS BLAS (requires compilation)

    ATLAS is aim to, by self-discovery, automatically generate an optimized BLAS library. (-- Cygwin or MinGW required -- ) For a step by step procedure please refer to the ALTAS Forum

    Part 1-c: Using GotoBLAS (requires compilation)

    (-- Cygwin or MinGW required -- )

    The GotoBLAS source is available from here (there's short registration form to fill), and can be compiled for Windows with Cygwin. No changes need to be made to GotoBLAS' config file Makefile.rule, unless a particular compiler is preferred. Happily, the config file automatically enables multithreading if more than one processor is available.

    1. Download and extract the GotoBLAS source to any directory of choice, and make any desired changes to the config file (the default option should also work well).
    2. In Cygwin, "cd" to the top-level directory containing the source, and type "make"
    3. The result of this process should be a file libgoto_-r.a, and a (symbolic) link libgoto.a pointing to this file. (For example, libgoto_banias-r1.26.a) but also the Windows library (*.lib) and dll are generated by default. .

    Final note:
    * Windows needs to be told where to find this dll, else you will get a serious error when you try to run your program. There are several ways to do accomplish this. One, is to add the location of the dll to the PATH environment variable. Another is to simply copy the dll to the Windows\system32 folder. I did the later.
    For more information, refer to Microsoft guidelines on Search Path Used by Windows to Locate a DLL

    Part 2: Using ScaLAPACK subroutines in a Visual (Studio) C/C++ Project

    1. Download the all the ScaLAPACK precompiled binaries: BLAS, LAPACK, BLACS and ScaLAPACK. File names of the precomputed debug libraries end with the letter "d" e.g. BLASd.lib and lapackd.lib (in comparison to the release versions BLAS.lib and lapack.lib).
    2. If you chose to compile ScaLAPACK, you will require the Intel Fortran compiler and Intel C compiler(distributed with libraries) [].
    3. Locate your BLAS libraries that you are going to use.
    4. Create a Visual Studio project with the following sample C program:
    5. rename the prototypes in the above program to
      void dgesv_( )
      void dgels_( )
      extern "C" void dgesv_( )
      extern "C" void dgels_( )
    6. Add the following libraries to the Visual Studio project settings, under Linker -> Input -> Additional Dependencies. For example, on my laptop: libgoto_banias-r1.26.lib lapack.lib Note: because BLAS libraries commonly provide faster versions of some LAPACK subroutines, the BLAS library must be listed before before LAPACK library. Note: the make sure that the gotoBLAS dll is on your system path e.g. in the WINDOWS\system32 folder, else binary won't run.
    7. Compile the project and run the resulting executable. You should get the output: The solution is
      -0.661082 9.456125 -16.014625
    Part 3 of this HOWTO will briefly explain what "dgesv" means and how to call it and other LAPACK subroutines with the appropriate arguments.


    We are working hard to improve the ScaLAPACK Windows support but it seems that users still have problems. In case of success or failure, please let us know. We would like to know how we are doing, and how we could further help you. Your post on the forum will be appreciated.

    Visual Studio Solution

    This VS solution works with VS Studio 2008 and Intel Compilers.
  • Download the SCALAPACK 1.8.0 for and don't forget to consult the README
  • Easy build with CMAKE

    Need some volunteers to move the BLACS and ScaLAPACK project into CMAKE!