Installation basics

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
endian675
Posts: 6
Joined: Tue Oct 26, 2010 4:45 pm

Installation basics

Post by endian675 » Tue Oct 26, 2010 5:01 pm

Hi

I am trying to install Magma 0.2 on the GPU machine at my university. I am getting the following error:

Code: Select all

phrjai@arnie:~/Other_Peoples_Code/magma_0.2> make
( cd testing/lin; make )
make[1]: Entering directory `/home/theory/phrjai/Other_Peoples_Code/magma_0.2/testing/lin'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/theory/phrjai/Other_Peoples_Code/magma_0.2/testing/lin'
( cd testing; make )
make[1]: Entering directory `/home/theory/phrjai/Other_Peoples_Code/magma_0.2/testing'
gfortran -fPIC testing_spotrf.o -o testing_spotrf lin/liblapacktest.a -L../lib \
          -lcuda -lmagma -lmagmablas -L/home/tomov/intel/mkl/10.0.1.014/lib/em64t -L/home/theory/phrjai/usr_local/cuda/lib64 -lmkl_em64t -lguide -lpthread -lcublas -lm  get_nb.cpp
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lmkl_em64t
collect2: ld returned 1 exit status
make[1]: *** [testing_spotrf] Error 1
make[1]: Leaving directory `/home/theory/phrjai/Other_Peoples_Code/magma_0.2/testing'
make: *** [test] Error 2
phrjai@arnie:~/Other_Peoples_Code/magma_0.2>
is there some other dependency that I need to install?

many thanks

klub
Posts: 1
Joined: Thu Oct 07, 2010 6:43 am

Re: Installation basics

Post by klub » Wed Oct 27, 2010 5:35 am

Yes, you must install a MKL library in order to run the tests. Tests compare between CPU and GPU implementations of MKL.

The easier here is to install the Intel MKL library (by default in /opt, or in your home if you don't have enough rights).

You must point to your installed mkl directory. make.inc.mkl file should look like:

Code: Select all

  LIB       = -lmkl_em64t -lguide -lpthread -lcublas -lm
  CUDADIR   = /usr/local/cuda
  LIBDIR    = -L$(HOME)/intel/mkl/10.0.1.014/lib/em64t \
                    -L$(CUDADIR)/lib64
  INC       = -I../include -I$(CUDADIR)/include

endian675
Posts: 6
Joined: Tue Oct 26, 2010 4:45 pm

Re: Installation basics

Post by endian675 » Wed Oct 27, 2010 3:21 pm

Many thanks, I appreciate your help.

I presume I don't need the Intel MKL in order to use the Magma library in general? Avoiding proprietary software is one of the main reasons for not wanting to use CULATools!

endian675
Posts: 6
Joined: Tue Oct 26, 2010 4:45 pm

Re: Installation basics

Post by endian675 » Thu Nov 18, 2010 6:09 pm

I've now got Magma installed, along with the ATLAS library, and can successfully run the tests. Now that I'm trying to compile my own code, I'm getting the following error, which I'm having difficulty resolving so I would appreciate your help:

Code: Select all

home/me/dev/msc/Other_Peoples_Code/magma/magma_0.2/lib/libmagma.a(spotrf_gpu.o): In function `magma_spotrf_gpu':
spotrf_gpu.cpp:(.text+0x28): undefined reference to `lsame_'
spotrf_gpu.cpp:(.text+0xa9): undefined reference to `magma_get_spotrf_nb'
spotrf_gpu.cpp:(.text+0x106): undefined reference to `spotrf_'
spotrf_gpu.cpp:(.text+0x139): undefined reference to `lsame_'
spotrf_gpu.cpp:(.text+0x1b1): undefined reference to `spotrf_'
spotrf_gpu.cpp:(.text+0x3c8): undefined reference to `spotrf_'
collect2: ld returned 1 exit status
my command line is:

Code: Select all

g++ -O3 -m64 \
	-I$MSC \
	-I$MSC/Other_Peoples_Code/ \
	-I$MSC/Other_Peoples_Code/boost_1_44 \
	-I$MSC/Other_Peoples_Code/ConfigFile \
	-I$MSC/Other_Peoples_Code/magma/magma_0.2/include \
	-I/usr/local/cuda/include \
	-fpermissive  \
	ArrayTranslator.cpp \
	Hydro.cpp \
	Main.cpp \
	IForces.cpp \
	Forces.cpp \
	Utils.cpp \
	IMatrixProvider.h \
	$MSC/Other_Peoples_Code/ConfigFile/ConfigFile.h \
	$MSC/Other_Peoples_Code/ConfigFile/Triplet.h \
	$MSC/Other_Peoples_Code/ConfigFile/ConfigFile.cpp \
        -L/usr/local/cuda/lib64 \
	-L/usr/lib64 \
	-L$MSC/Other_Peoples_Code/magma/magma_0.2/lib \
	-L$MSC/Other_Peoples_Code/lapack-lite-3.1.1 \
	/home/me/dev/msc/Other_Peoples_Code/lapack-lite-3.1.1/lapack_LINUX64.a \
	/home/me/dev/msc/Other_Peoples_Code/lapack-lite-3.1.1/blas_LINUX64.a \
 	-lcuda -latlas -lcublas -lm -lmagma -lmagmablas -o gpuhydro.exe
any help would be greatly appreciated.
Last edited by endian675 on Wed Jan 26, 2011 8:05 pm, edited 1 time in total.

endian675
Posts: 6
Joined: Tue Oct 26, 2010 4:45 pm

Re: Installation basics

Post by endian675 » Thu Nov 18, 2010 6:33 pm

Resolved. I needed -L$MSC/OPC/lapack-lite-3.1.1, and -llapack_atlas. Also needed get_nb.cpp added to my source file list.

Post Reply