MAGMA on windows or linux

Open discussion for MAGMA

MAGMA on windows or linux

Postby cacjorge » Thu Mar 15, 2012 1:44 am

Hello Everyone,

I've been trying to compile MAGMA libraries on linux and on windows, but they have been unsuccessful so far.
I am not very good with this, so can anyone help with that matter, please?
I want to work with this library for my master's program and I'm having some trouble on that.

Thank you,
Carlos
cacjorge
 
Posts: 4
Joined: Wed Dec 14, 2011 9:29 am

Re: MAGMA on windows or linux

Postby mgates3 » Mon Mar 19, 2012 4:46 pm

Can you give some details about what you tried, what it did, what you expected, what is your environment (version of Linux, compiler, etc.)?

On Linux, as a first step you need to edit the make.inc file. Several example make.inc files are given.

-mark
mgates3
 
Posts: 437
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA on windows or linux

Postby cacjorge » Tue Mar 20, 2012 1:21 am

Hello and thank you for replying,

I'm currently using Ubuntu 11.10 with Nvidia driver 285.05.33 from CUDE developer site.
My CUDA environment is already set and tested, so I know that CUDA is working, but a few days ago I came across this package and I really want to try it out to see if its going to be beneficial to me.

I don't have a lot of experience on the make.inc files, therefore I couldnt do one by myself, so I tried the one from this topic:
http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=365&hilit=+sizeptr#p1208

I installed ATLAS from the repository, set the right paths and I even tried to replace the file sizeptr.c under control folder.
The libraries were compiled and created both .a's, but I can't compile the examples.

It always says that I'm missing -lf77blas -lcblas -lf2c -lcublas

Where can I find a make.inc that can suit for what I have?
cacjorge
 
Posts: 4
Joined: Wed Dec 14, 2011 9:29 am

Re: MAGMA on windows or linux

Postby cacjorge » Tue Mar 20, 2012 6:36 pm

Ok,

So this is the error I'm getting everytime it tries to compile the testing examples:

Code: Select all
gcc -O3 -DADD_ -DGPUSHMEM=200 -I/usr/local/cuda/include -I../include -I../quark/include -c testing_zgemm.cpp -o testing_zgemm.o
gcc -O3 -DADD_ -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200  testing_zgemm.o  -o testing_zgemm lin/liblapacktest.a -L../lib \
          -lcuda -lmagma -lmagmablas -lmagma -L/usr/lib/atlas-base/atlas/ -L/usr/lib/atlas-base/ -L/usr/local/cuda/lib  /usr/lib/atlas-base/atlas/ -lf77blas -latlas -lcblas -lf2c -lcublas -lm -lgfortran
/usr/bin/ld: cannot find /usr/lib/atlas-base/atlas/: File format not recognized
/usr/bin/ld: cannot find -lf2c
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
rm testing_zgemm.o
make[1]: Leaving directory `/home/carlos/Downloads/magma_1.1.0/testing'
make: *** [test] Error 2


What else do I need to have to compile it successfully?
cacjorge
 
Posts: 4
Joined: Wed Dec 14, 2011 9:29 am

Re: MAGMA on windows or linux

Postby cacjorge » Tue Mar 20, 2012 7:09 pm

Ok,

I fixed the -lf2c error, that was stupid of me, but now i'm getting this

Code: Select all
gcc -O3 -DADD_ -DGPUSHMEM=200 -I/usr/local/cuda/include -I../include -I../quark/include -c testing_zgemm.cpp -o testing_zgemm.o
gcc -O3 -DADD_ -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200  testing_zgemm.o  -o testing_zgemm lin/liblapacktest.a -L../lib \
          -lcuda -lmagma -lmagmablas -lmagma -L/usr/lib/atlas-base/atlas -L/usr/lib/atlas-base -L/usr/local/cuda/lib  -lf77blas -latlas -lcblas -lcublas -lm -lgfortran -lf2c
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0x521): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x544): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x567): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x940): undefined reference to `zlange_'
/usr/lib/gcc/i686-linux-gnu/4.4.6/../../../../lib/libf2c.so: undefined reference to `MAIN__'
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
rm testing_zgemm.o
make[1]: Leaving directory `/home/carlos/Downloads/magma_1.1.0/testing'
make: *** [test] Error 2


I know it must be something related to atlas, but my atlas is installed and tested.
What am I still missing?
cacjorge
 
Posts: 4
Joined: Wed Dec 14, 2011 9:29 am

Re: MAGMA on windows or linux

Postby mateo70 » Wed Mar 21, 2012 10:46 pm

Hello,

I'm surprised you are using f2c, this was the Fortran / C limking library for f77, if all your code is compiled with gfortran, -lgfortran should be enough.
Or with the option -ff2c to compile f2c compliant code according to the man.

Mathieu
mateo70
 
Posts: 41
Joined: Tue Mar 08, 2011 12:38 pm

Re: MAGMA on windows or linux

Postby mgates3 » Wed May 02, 2012 7:02 pm

I think you need to add LAPACK. The ATLAS library provides the BLAS routines, not the higher-level LAPACK routines. For what it's worth, here is how I link a generic program with ATLAS (but not using magma). Your libraries may differ.

# -lifcore resolves undefined reference to `for_write_seq_fmt'
# -ldl resolves undefined reference to `dlsym'
ATLAS := /mnt/scratch/sw/atlas-gcc
INCLUDES := -I$(ATLAS)/include
LIBS :=
LIBBLAS := -L$(ATLAS)/lib -llapack -lcblas -lf77blas -latlas -lifcore -ldl

-mark
mgates3
 
Posts: 437
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron