Trouble linking CBLAS routines

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Trouble linking CBLAS routines

Postby ohil » Mon May 16, 2011 11:53 pm

I am trying to compile MAGMA on a CentOS 5.5 machine. I dont have root access, so am compiling all dependencies locally. Also the gcc version is 4.1.2
I followed ... 0000000000 to compile ATLAS along with LAPACK. Everything worked out fine. I have CUDA installed along with the appropriate drivers. Now my problem is, when trying to make MAGMA, I get the following error
Code: Select all
../lib/libmagma.a(zgeev.o): In function `magma_zgeev':
zgeev.cpp:(.text+0xbdf): undefined reference to `cblas_dznrm2(int, void const*, int)'

I have both the dynamic and static versions of cblas, atlas, lapack, ptf77blas, ptcblas and f77blas in a folder that MAGMA's can see (It complains when I remove one of these files, so I'm sure it able to reach these).

libcblas.a and both generated by ATLAS exist. I even tried with nm and can see these functions defined.
Code: Select all
nm libmagma.a | grep cblas

produces mangled names like
Code: Select all
 U _Z11cblas_zscaliPKvPvi

I am fairly new to compiling so many things at once. Can someone please help?

In case this is relevant, here is a snippet from my
Code: Select all
OPTS      = -O3 -DADD_
FOPTS     = -O3 -DADD_ -x f95-cpp-input
NVOPTS    = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS    = -fPIC -Xlinker -zmuldefs
LIB       = -lf77blas -latlas -lcblas -lcublas -lm -llapack
Posts: 2
Joined: Mon May 16, 2011 11:38 pm

Re: Trouble linking CBLAS routines

Postby ohil » Tue May 17, 2011 12:52 pm

Figured it out. Not sure which one of these was the problem, but
1. I had a system wide lapack installation. Maybe it was looking at that liblapack instead of atlas generated liblapack
2. I just got the sysadmin to install atlas from the CentOS repository!
Everything just works!
Posts: 2
Joined: Mon May 16, 2011 11:38 pm

Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest