Fundamental Numerical Libraries

Stephen Y.F. Wang

2017-01-05, updated on 2017-05-22


 

Openblas 好

Openblas is an open source implementation of the BLAS (Basic Linear Algebra Subprograms) API with many hand-crafted optimizations for specific processor types.

Build Openblas on Windows:

  1. Download the source file from http://www.openblas.net/
  2. Under MSYS prompt:

    you can find the full documentation of compilation options from Makefile.rule

IPOPT: Interior Point OPTimizer

Compile the shared library on Windows:

  1. Download the IPOPT lasted source from https://www.coin-or.org/download/source/Ipopt/, unzip it, refer the path as IPATH.
  2. Download the HSL for IPOPT (Linear Solvers provided by Harwell Subroutine Library) from http://www.hsl.rl.ac.uk/ipopt/, unzip it to coinhsl, then move the coinhsl folder to IPATH/ThirdParty/HSL.
  3. Under the MSYS prompt:

  4. If failed, these configure options may help:

  5. Compile and test the Fortran and C examples:

The Python Interface:

  1. Download the cyipopt source from https://bitbucket.org/amitibo/cyipopt.
  2. Modify the main_win32() function as:

  3. Then the usual python setup.py install should work.

ndl: Fortran Numerical Differentiation Library

Source Code: C. Voglis, P.E. Hadjidoukas, I.E. Lagaris, D.G. Papageorgiou, A numerical differentiation library exploiting parallel architectures, Computer Physics Communications, Volume 180, Issue 8, August 2009, Pages 1404-1415, ISSN 0010-4655, http://dx.doi.org/10.1016/j.cpc.2009.02.004.

Compile the library on Windows:

A directory called ndl-1.0/ will be created with three subdirectories serial/, openmp/ and mpi/ containing the serial, OpenMP-parallel and MPI-parallel distributions respectively. Any of the three distributions can be installed by entering the corresponding directory and executing the following steps under MSYS prompt:

  1. Configure the package:
    1. Serial version

      ./configure F77=gfortran --prefix=<install-dir>
    2. Openmp version

      ./configure F77=gfortran FFLAGS=-fopenmp --prefix=<install-dir>
  2. Make and install:

    make
    make install

Gambit: Software Tools for Game Theory

You can get the official Win32 bit GUI program of Gambit from http://www.gambit-project.org/, but if want a x64 version or the Python library, you should compile it from source.

Compile the shared library on Windows:

  1. Download the Gambit lasted source from http://www.gambit-project.org/, unzip it, refer the path as GPATH.
  2. Note that only GCC is the supported compiler for Gambit.
  3. Under the MSYS prompt:

    cd /GPATH
    ./configure --prefix=/INSTALLPATH --disable-gui CXXFLAGS="-fpermissive"
    make
    make install

The Python Interface:

  1. Modify the input of Extension() in setup.py as:

  2. The usual python setup.py should work, note that you should add the path of Gambit command line tools to system Path since Python will call these tools when computing Nash equilibria.