[home] [Publications] [Research] [Gallery] [Contact] [Links]


GotoBLAS: Building a complete set
of BLAS & LAPACK symbols



[Download] assemble_GotoBLAS_GotoLAPACK_libs.tar.gz


GotoBLAS is a highly optimised implementation of BLAS. The high efficiency obtained is achieved by utilising architecture specific information. The distribution of GotoBLAS provides implementations of the BLAS functions and a select number of implementations from LAPACK As of version 1.20 this consisted of (Xgesv, Xgetf2, Xgetrf, Xgetrs, Xlaswp, Xlauu2, Xlauum, Xpotf2, Xpotrf, Xpotri, Xtrti2, Xtrtri, lsame) where X denotes the data type, i.e. (d)ouble, (s)ingle or complex (z). To combine GotoBLAS with a full suite of LAPACK functions one could build LAPACK using the GotoBLAS library, but this would preclude using the LAPACK symbols defined within the GotoBLAS library. To get around this, I wrote a script which combines GotoBLAS and LAPACK symbols into two new libraries.

Given libGotoBLAS.a and libLAPACK.a (vendor supplied for example), the script generates the following libraries;

libgoto_blas.a
      - Contains only the symbols you would expect in a standard BLAS implementation.
      - All lapack symbols defined in libGotoBLAS.a are removed.

libgoto_lapack.a
      - Contains all symbols originally in libLAPACK.a.
      - For the common lapack symbols between libGotoBLAS.a and libLAPACK.a, we only keep the GotoBLAS version as these wil inevitably be faster.

To keep track of which symbols came from which library, I prepended "goto_" to the name of each object file I extract from libGotoBLAS.a. This can be verified by executing "nm libgoto_lapack.a". If everything has worked, you'll see some file names with and without the word "goto_" at the start.

To use the symbol merging script, you will just need to edit the following lines within assemble_GotoBLAS_GotoLAPACK_libs.tar.gz

      # Location and library name for LAPACK

      $LAPACK_DIR = '/home/dmay/software/lapack-3.1.1';
      $LAPACK_LIBNAME = 'liblapack_LINUX_x86_goto.a';

      # Location and library name for GotoBLAS

      $GOTO_DIR = '/home/dmay/software/GotoBLAS';
      $GOTO_LIBNAME = 'libgoto_opteron-r1.21.a';