How to build OpenBLAS with Arm Compiler

Overview Before you begin Procedure Related information


How to build OpenBLAS with Arm Compiler.

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. For more information, see the OpenBLAS website.

For the purposes of this build, the following components are used:

Component Form
OpenBLAS Version 0.3.3
Arm Compiler for HPC
Version 19.1
Operating system RHEL 7.5
Cavium ThunderX2


  1. Clone the OpenBLAS git repository:

    git clone
  2. Change into the new OpenBLAS directory and checkout the version tagged v0.3.3 into a local branch labelled v0.3.3:

    cd OpenBLAS
    git checkout v0.3.3 -b v0.3.3
  3. (Optional) Compiler flags for supported AArch64 CPUs are set in Makefile.arm64. Specify any build options here. Alternatively, you can supply them to make at compile time.

  4. Set an install location, INSTALL_DIR, where the compiler library will be installed to. For example:

    export INSTALL_DIR=/path/to/OpenBLAS_install

    replacing /path/to/OpenBLAS_install with the path to your installation.

  5. Optionally, OpenBLAS provides support for the following AArch64 targets:

    • CORTEXA57


    • THUNDERX2T99

    • A generic ARMV8 target

    The build system should correctly identify the host CPU, however, the target can be manually specified by passing TARGET=<insert_target> to make.

  6. To build the library and run the test suites, run make in the OpenBLAS top-level directory and set the the C and Fortran compilers to armclang and armflang, respectively:

    make USE_OPENMP=1 CC=armclang FC=armflang
  7. After OpenBLAS is successfully built and tested, install it in the chosen location, using:

    make install PREFIX=$INSTALL_DIR