make magma

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
Magniff
Posts: 18
Joined: Thu May 19, 2011 4:46 am

make magma

Post by Magniff » Sun Apr 08, 2012 3:39 pm

Hello there, friends

I am currently trying to build MAGMA lib, which, i believe, provides the gs gpu routines;

so i got a problem (i know, that magma is not your product, but i hope some of you compiled it correctly)

so that is my make file:


# GPU_TARGET specifies for which GPU you want to compile MAGMA
# 0: Tesla family
# 1: Fermi Family
#
GPU_TARGET = 0

CC = /usr/bin/gcc-4.4
NVCC = /usr/local/cuda/bin/nvcc
FORT = /usr/bin/gfortran-4.4

ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

OPTS = -O3 -DADD_
FOPTS = -O3 -DADD_ -x f95-cpp-input
NVOPTS = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS = -fPIC -Xlinker -zmuldefs

LIB = /usr/lib/lapack/liblapack.a \
-lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR = /usr/local/cuda

LIBDIR = -L/usr/lib/atlas-base \
-L/usr/lib \
-L/lib \
-L/home/magniff/Desktop/downloads/magma_1.1.0/lib \
-L/usr/lib/lapack \
-L$(CUDADIR)/lib64 \
-L$(CUDADIR)/lib
INC = -I$(CUDADIR)/include \

LIBMAGMA = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magma.a
LIBMAGMABLAS = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magmablas.a


so it starts and runs for a couple of mins, and then crushes:
/usr/bin/ld: cannot find -lmagma

i dont really get it, maby some of you got the same error?

sys:
debian 6
nvidia gtx275
last dev. drivers;

magniff;

VasiaS
Posts: 11
Joined: Fri Feb 03, 2012 9:15 pm

Re: make magma

Post by VasiaS » Sun Apr 08, 2012 6:48 pm

hello, I have successfully installed the magma in two ways. try delete this:
LIBMAGMA = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magma.a
LIBMAGMABLAS = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magmablas.a
These lines were commented in my "make file".

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: make magma

Post by jbeuken » Sun Apr 08, 2012 8:24 pm

Hi magniff,

LIBDIR = -L/usr/lib/atlas-base \
-L/usr/lib \
-L/lib \
-L/home/magniff/Desktop/downloads/magma_1.1.0/lib \
-L/usr/lib/lapack \
-L$(CUDADIR)/lib64 \
-L$(CUDADIR)/lib
INC = -I$(CUDADIR)/include \

LIBMAGMA = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magma.a
LIBMAGMABLAS = /home/magniff/Desktop/downloads/magma_1.1.0/lib/magmablas.a


the LIBDIR is used to find the blas/lapack and cuda libraries not for magma !

you must remove the line "-L/home/magniff/Desktop/downloads/magma_1.1.0/lib \" in LIBDIR section

the LIBMAGMA and LIBMAGMABLAS are used to "install" the magma libraries during the compilation ( not during the installation...)

regards

jmb
------
Jean-Michel Beuken
Computer Scientist

Magniff
Posts: 18
Joined: Thu May 19, 2011 4:46 am

Re: make magma

Post by Magniff » Sun Apr 08, 2012 10:04 pm

ok, now the error message is

/usr/bin/ld: warning: libcudart.so.4, needed by /usr/local/cuda/lib64/libcublas.so, not found (try using -rpath or -rpath-link)

but i found link to libcudart.so.4 in /usr/local/cuda/lib64/ and /usr/local/cuda/lib/ folders

maby i need to use some special key while running make (sorry, i am noob ^_^ )

any idea?)

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: make magma

Post by jbeuken » Mon Apr 09, 2012 9:54 am

Hi,

If the environment is 64bits, try without "-L$(CUDADIR)/lib"


Code: Select all

...
LIBDIR = -L/usr/lib/atlas-base \
-L/usr/lib \
-L/lib \
-L/usr/lib/lapack \
-L$(CUDADIR)/lib64

INC = -I$(CUDADIR)/include
...


jmb
------
Jean-Michel Beuken
Computer Scientist

Locked