Page 1 of 1

Installation basics

Posted: Tue Oct 26, 2010 5:01 pm
by endian675
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

Re: Installation basics

Posted: Wed Oct 27, 2010 5:35 am
by klub
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

Re: Installation basics

Posted: Wed Oct 27, 2010 3:21 pm
by endian675
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!

Re: Installation basics

Posted: Thu Nov 18, 2010 6:09 pm
by endian675
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.

Re: Installation basics

Posted: Thu Nov 18, 2010 6:33 pm
by endian675
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.