Running CLAPACK under Windows

Part 1: Getting a BLAS library

Preamble
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 .
If you decide to build CLAPACK, the Reference BLAS is included in the CLAPACK package.

Part 1-c: Using GotoBLAS (requires compilation)

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.

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).

In Cygwin, "cd" to the top-level directory containing the source, and type "make"

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, they are in the exports folder .

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

Download the CLAPACK precompiled libraries: libf2c.lib, lapack.lib plus blas.lib if you decide to go for the Reference BLAS File names of the precomputed debug libraries end with the letter "d" e.g. BLASd.lib and lapackd.lib.

Locate your BLAS libraires for your machine. (You may want to choose the Debug config if you choose GOTOBLAS)

If you are not using the Reference blas, you will need to modify change the properties "Linker > General > Additional Library Directory" to tell Visual Studio where the libraries are, and also add the name of your BLAS library in "Linker > Input > Additional Dependencies"

Compile the project and run the resulting executable. You should get the output:
The solution is

Build Instructions for CLAPACK 3.2.1 for Windows with Visual Studio

Point to a new folder where you want the build to be (not the same is better)

Click configure, check the install path if you want to have the libraries and includes in a particular location.

Choose Visual Studio Solution. You can also choose nmake or any other platform.

You may have to click again configure until everything becomes white

Click generate, that will create the Visual Studio for CLAPACK and you are done.

Close CMAKE

Look in your "build" folder, you have your CLAPACK Visual Studio Solution, just open it.

Build the "ALL_BUILD" project, it will build the solution and create the librarires

Build the "INSTALL". This will put the libraries and include in your install folder.

Build the "RUN_TESTS". The BLAS and CLAPACK testings will be run.

Support and Feedback

We are working hard to improve the CLAPACK Windows support but it seems that users still have problems.
We would like to know how we are doing, and how we could further help you.
Your post on the forum will be appreciated.