Using GotoBLAS with Elemental

50 views
Skip to first unread message

ANJU KAMBADUR

unread,
May 16, 2013, 1:55:51 PM5/16/13
to <elemental-dev@googlegroups.com>

I am having trouble configuring Elemental with GotoBLAS2. I have tried using both the static and shared libraries (libgoto2.a and libgoto2.so), but get this error:

# cmake ../elemental-0.79-p1 -DCMAKE_INSTALL_PREFIX=${HOME}/ANJU/Software/ -DMATH_LIBS=${HOME}/ANJU/Software/lib/libgoto2.a
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build mode not specified, defaulting to PureRelease build.
-- The Fortran compiler identification is GNU
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Verifying Fortran/CXX Compiler Compatibility
-- Verifying Fortran/CXX Compiler Compatibility - Success
-- Found MPI_C: /usr/lib64/mpich2/lib/libmpich.so;/usr/lib64/mpich2/lib/libopa.a;/usr/lib64/libpthread.so;/usr/lib64/librt.so  
-- Found MPI_CXX: /usr/lib64/mpich2/lib/libmpichcxx.so;/usr/lib64/mpich2/lib/libmpich.so;/usr/lib64/mpich2/lib/libopa.a;/usr/lib64/libpthread.so;/usr/lib64/librt.so  
-- Found MPI_Fortran: /usr/lib64/mpich2/lib/libmpichf90.so;/usr/lib64/mpich2/lib/libmpichf90.so;/usr/lib64/mpich2/lib/libmpich.so;/usr/lib64/mpich2/lib/libopa.a;/usr/lib64/libpthread.so;/usr/lib64/librt.so  
-- Using user-defined MATH_LIBS=/gsa/pokgsa/home/h/a/hadoopml/ANJU/Software/lib/libgoto2.a
-- Using MATH_LIBS=/gsa/pokgsa/home/h/a/hadoopml/ANJU/Software/lib/libgoto2.a
-- Looking for daxpy
-- Looking for daxpy - not found
-- Looking for daxpy_
-- Looking for daxpy_ - not found
CMake Error at CMakeLists.txt:288 (message):
  Could not determine BLAS format.

-- Configuring incomplete, errors occurred!

I quickly glanced at this thread: http://www.cmake.org/pipermail/cmake/2011-January/042167.html.  Any thoughts? I think I am missing something obvious.

Thanks,


- Anju
--------------------------------------------
Prabhanjan Kambadur
Research Staff Member
Business Analytics and Mathematical Sciences
IBM TJ Watson Research Center
Room 30-229 A

Jack Poulson

unread,
May 16, 2013, 2:06:46 PM5/16/13
to elemen...@googlegroups.com
Hi Anju,

Unfortunately, specifying just libgoto2.a is not enough, as there are likely several other underlying libraries which need to be linked. This should be confirmed if you look at the bottom of the following file in your build directory:
    CMakeFiles/CMakeError.log
The usual offenders are: -lpthread, -lm, and Fortran libraries such as -lgfortran. I tend to try to compile a trivial program containing a BLAS routine to figure out the flags, as this is much faster than waiting for the entire CMake configuration at each attempt. For example:

// You need to decide if there is an appended underscore or not
extern "C" {
void daxpy( int* n, double* alpha, double* x, int* incx, double* y, int* incy );
}
int main()
{
    int n=1, incx=1, incy=1;
    double alpha=1., x, y;
    daxpy( &n, &alpha, &x, &incx, &y, &incy );
    return 0;
}

Jack


--
You received this message because you are subscribed to the Google Groups "elemental-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elemental-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

ANJU KAMBADUR

unread,
May 16, 2013, 2:10:02 PM5/16/13
to elemen...@googlegroups.com

Found it. My GotoBLAS was built with threading enabled, so setting -fopenmp as an additional command line flag solved the problem.




- Anju
--------------------------------------------
Prabhanjan Kambadur
Research Staff Member
Business Analytics and Mathematical Sciences
IBM TJ Watson Research Center
Room 30-229 A


Inactive hide details for ANJU KAMBADUR---05/16/2013 02:05:56 PM---I am having trouble configuring Elemental with GotoBLAS2. I ANJU KAMBADUR---05/16/2013 02:05:56 PM---I am having trouble configuring Elemental with GotoBLAS2. I have tried using both the static and sha


    From:

ANJU KAMBADUR/Watson/IBM@IBMUS

    To:

"<elemen...@googlegroups.com> " <elemen...@googlegroups.com>

    Date:

05/16/2013 02:05 PM

    Subject:

[elemental] Using GotoBLAS with Elemental

    Sent by:

elemen...@googlegroups.com

--

You received this message because you are subscribed to the Google Groups "elemental-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elemental-de...@googlegroups.com.
For more options, visit

ANJU KAMBADUR

unread,
May 16, 2013, 2:13:07 PM5/16/13
to elemen...@googlegroups.com

Thanks Jack. Here is the command line option that enables compilation with GotoBLAS2:

-DMATH_LIBS="-L<PATH-TO-GOTOBLAS-FOLDER> -lgoto2 -fopenmp"


 

- Anju
--------------------------------------------
Prabhanjan Kambadur
Research Staff Member
Business Analytics and Mathematical Sciences
IBM TJ Watson Research Center
Room 30-229 A


Inactive hide details for Jack Poulson ---05/16/2013 02:09:54 PM---Hi Anju, Unfortunately, specifying just libgoto2.a is not enJack Poulson ---05/16/2013 02:09:54 PM---Hi Anju, Unfortunately, specifying just libgoto2.a is not enough, as there are


    From:

Jack Poulson <jack.p...@gmail.com>


    Date:

05/16/2013 02:09 PM

    Subject:

Re: [elemental] Using GotoBLAS with Elemental

Reply all
Reply to author
Forward
0 new messages