Problem with linking magma library "magmamic 1.3.1"

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
shekhar_shelke
Posts: 1
Joined: Mon May 25, 2015 4:56 am

Problem with linking magma library "magmamic 1.3.1"

Post by shekhar_shelke » Mon May 25, 2015 5:06 am

i am new to multicore programming as well as to intel compiler. i am succesfully compiling the program but facing problem with linking.the script i am using is

Code: Select all

export MAGMA_INC=~/hitesh/scrap/magmamic-1.3.1/include/
export MAGMA_LIBS=~/hitesh/scrap/magmamic-1.3.1/lib/

icc -mkl -O3 -DHAVE_MIC -DADD_ -Wall -I$MAGMA_INC -I/home/internal/cfd/srisai/hitesh/scrap/magmamic-1.3.1/include -I/opt/intel/mic1/coi/include -I/usr/include/intel-coi -c 22may.cpp -o may22.o

if [ $? -ne 0 ]; then
  echo "Error compiling MAGMA Code"
  exit
  else echo "First Step Done..!!!"
fi

icc may22.o -o x22 -mkl -O3 -DHAVE_MIC -DADD_ -Wall -fPIC -Xlinker -zmuldefs -Wall -DNOCHANGE -DHOST -L$MAGMA_LIBS

if [ $? -ne 0 ]; then
  echo "Error linking libraries."
  else  echo "Congrats..!! Now run ./example on MIC."
fi
and errors i am getting are :

Code: Select all

may22.o: In function `main':
22may.cpp:(.text+0x39): undefined reference to `magma_init'
22may.cpp:(.text+0x4c): undefined reference to `magma_get_devices'
22may.cpp:(.text+0x6d): undefined reference to `magma_queue_create'
22may.cpp:(.text+0x2aa): undefined reference to `magma_malloc'
22may.cpp:(.text+0x2cb): undefined reference to `magma_finalize'
22may.cpp:(.text+0x2e3): undefined reference to `magma_malloc'
22may.cpp:(.text+0x304): undefined reference to `magma_finalize'
22may.cpp:(.text+0x314): undefined reference to `magma_malloc_pinned'
22may.cpp:(.text+0x32a): undefined reference to `magma_malloc_pinned'
22may.cpp:(.text+0x340): undefined reference to `magma_malloc_pinned'
22may.cpp:(.text+0x504): undefined reference to `magma_dsetmatrix'
22may.cpp:(.text+0x523): undefined reference to `magma_dsetvector'
22may.cpp:(.text+0x56e): undefined reference to `magma_dgesv_mic'
22may.cpp:(.text+0x590): undefined reference to `magma_dgetvector'
22may.cpp:(.text+0x5fb): undefined reference to `magma_free_pinned'
22may.cpp:(.text+0x604): undefined reference to `magma_free_pinned'
22may.cpp:(.text+0x60c): undefined reference to `magma_free_pinned'
22may.cpp:(.text+0x615): undefined reference to `magma_free_pinned'
22may.cpp:(.text+0x61e): undefined reference to `magma_free'
22may.cpp:(.text+0x627): undefined reference to `magma_free'
22may.cpp:(.text+0x62f): undefined reference to `magma_queue_destroy'
22may.cpp:(.text+0x634): undefined reference to `magma_finalize'
please help me.
Thank you.

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

Re: Problem with linking magma library "magmamic 1.3.1"

Post by mgates3 » Tue May 26, 2015 12:28 pm

Sorry, this looks like a problem with how the Makefiles put everything into one library. If the timestamps don't work correctly, functions in one directory get left out.

Were you able to compile the MIC-MAGMA testers?

You can try this:

Code: Select all

rm interface_mic/stamp
make lib
make test
or

Code: Select all

cd interface_mic
make clean
make
cd ..
make lib
make test
We hope to update the Makefiles to avoid this issue in the future.
-mark

Post Reply