undefined reference to `printout_devices'

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
jluciove
Posts: 2
Joined: Wed May 18, 2016 4:15 pm

undefined reference to `printout_devices'

Post by jluciove » Tue Sep 05, 2017 8:23 am

Hi,

I am trying to integrate the magma library into SUNDIALS suite specifically CVODEs. So far I have done the following.

1) I ran the examples (I am using MAGMA 2.2.0) on my universities cluster using the intel compiler, cuda 7.5.18 and intel math kernel library
2) Added the code necessary for MAGMA to run in CVODEs and compiled a static library that is dependent on the MAGMA library
a. I know that library linking order matters in the static library it is written the following way magma, cudart, cuda
3) Now I am attempting to access the static library, libsundials_cvode.a, from a C++ application and I get the following error:

/home/1704/SundialsMagmaInstall/lib/libsundials_cvode.a(cvode_gpu.o): In function `CVodeInitGPU':
cvode_gpu.c:(.text+0x1e5): undefined reference to `printout_devices'

I first thought it could have been a linking error and found that libcuda was not in the lib64 directory but in the stubs directory (Bold below). So I changed that to no avail. Below is the compiler input:

icpc -O3 -o DynamicModelBuilder.out -std=c++11 -I/home/1704/SundialsMagmaInstall/include -I/home/1704/MagmaInstall/include -I/home/software/cuda/7.5.18/include *.cpp -L/home/1704/SundialsMagmaInstall/lib -lsundials_cvode -lsundials_nvecserial -L/home/1704/MagmaInstall/lib -lmagma -L/home/software/cuda/7.5.18/lib64 -lcudart -lcublas -L/home/software/cuda/7.5.18/lib64/stubs -lcuda -w

Any help would be appreciated.

Thanks,

Juan

mgates3
Posts: 878
Joined: Fri Jan 06, 2012 2:13 pm

Re: undefined reference to `printout_devices'

Post by mgates3 » Tue Sep 05, 2017 12:19 pm

There is no printout_devices() function currently in MAGMA.

Code: Select all

src/magma-2.2.0> grep -r printout_devices .
src/magma-2.2.0> 
There used to be a printout_devices function that the MAGMA testers used, way back in MAGMA 1.3. This was replaced with magma_print_environment() in MAGMA 1.5. Its main purpose is for the testers to print out the devices, libraries, # threads, etc. There's no need for code outside MAGMA to call it, though I suppose you may if you want.

You shouldn't need to link with -lcuda. You may need to put -lcublas before -lcudart. The link line we usually use (see make.inc-examples) is:

Code: Select all

LIB      += -lcublas -lcusparse -lcudart -lcudadevrt
-mark

Post Reply