Building Goto BLAS

This file documents the use of the x86 Open64 Compiler Suite.
© 2009 Advanced Micro Devices, Inc.

Goto BLAS Info

The Goto BLAS library is an optimized implementation of BLAS routines (Basic Linear Algebra Subprograms), developed by Kazushige Goto at the University of Texas at Austin. It provides an alternative to ACML, MKL, or SCSL. To use the Goto BLAS library, you will need to download the source, uncompress it, install it, and then link it to your application. These steps, and any known limitations, are described in the sections below

Download: Goto BLAS (version 1.09).

Building Goto BLAS

Uncompress the downloaded tarball with:

     >tar -zxvf GotoBLAS-1.09.tar.gz

To build 32bit targets, the Makefile.rule file will need two lines added, from this orginal which will look like this:

     <line 308>
     ifeq ($(C_COMPILER), OPEN64)
     COMPILER     = opencc
     ifeq ($(SUPPORTED_DYNLIB), YES)
     CCOMMON_OPT += -fPIC
     endif
     ifndef BINARY64
     FCOMMON_OPT += -m32
     else
     FCOMMON_OPT += -m64
     endif
     endif

you need to add CCOMMON_OPT definition which include -m32, so that changed file looks like this:

     ifeq ($(C_COMPILER), OPEN64)
     COMPILER     = opencc
     ifeq ($(SUPPORTED_DYNLIB), YES)
     CCOMMON_OPT += -fPIC
     endif
     ifndef BINARY64
     CCOMMON_OPT += -m32
     FCOMMON_OPT += -m32
     else
     FCOMMON_OPT += -m64
     endif
     endif

For the 64bit build:

     >make clean
     >make F_COMPILER=OPEN64 C_COMPILER=OPEN64
     >cd exports
     >make F_COMPILER=OPEN64 C_COMPILER=OPEN64 so
     >cd ..

For the 32bit build:

     >make clean
     >make F_COMPILER=OPEN64 C_COMPILER=OPEN64 BINARY32=1
     >cd exports
     >make F_COMPILER=OPEN64 C_COMPILER=OPEN64 BINARY32=1 so
     >cd ..

It will build the .so and .a files. Install them into an appropriate library directory. One approach is to install in a system directory according to local system policy, and another is to install it in the user's home directory.

Linking with Goto BLAS

Goto BLAS is provided as a dynamic shared library, and it needs to be linked into the application. This is achieved using the usual means: Use the -L linker option to specify the directory containing the Goto BLAS library. Use the -l linker option to cause the Goto BLAS library to be linked in. For example, if the Goto BLAS library is called:

     libgoto_opteron-64-r1.26.so

Then use:

     -lgoto_opteron-64-r1.26

Running with Goto BLAS

If the Goto BLAS library is not in a default system library directory, then it will be necessary to specify the PATH to the library using the LD_LIBRARY_PATH environment variable. When running an MPI application using the Goto BLAS library, it may be necessary to take additional steps to propagate the LD_LIBRARY_PATH variable to each MPI process in the job.

Known Limitations

There are no known limitations.