MAGMA on windows or linux
MAGMA on windows or linux
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
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
Re: MAGMA on windows or linux
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
On Linux, as a first step you need to edit the make.inc file. Several example make.inc files are given.
-mark
Re: MAGMA on windows or linux
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:
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?
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:
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?
Re: MAGMA on windows or linux
Ok,
So this is the error I'm getting everytime it tries to compile the testing examples:
What else do I need to have to compile it successfully?
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
Re: MAGMA on windows or linux
Ok,
I fixed the -lf2c error, that was stupid of me, but now i'm getting this
I know it must be something related to atlas, but my atlas is installed and tested.
What am I still missing?
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
What am I still missing?
Re: MAGMA on windows or linux
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
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
Re: MAGMA on windows or linux
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
# -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