Running Examples

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Running Examples

Postby matthiasredies » Wed Mar 22, 2017 12:07 pm

I installed magma through AUR (arch user repository) and now I'm trying to build some of the examples that come with MAGMA. After setting some of the variables I would built the examples:
Code: Select all
MAGMADIR     ?= /opt/magma
CUDADIR      ?= /opt/cuda
OPENBLASDIR  ?= /usr/local/openblas


The building throws no errors, but when I run the examples I get:
Code: Select all
./example_v2: error while loading shared libraries: libmagma.so: cannot open shared object file: No such file or directory


What am I doing wrong?

Kind regards

Matthias
matthiasredies
 
Posts: 1
Joined: Wed Mar 22, 2017 11:55 am

Re: Running Examples

Postby mgates3 » Wed Mar 22, 2017 1:54 pm

To use as a shared library, MAGMA needs to be in your library path. Assuming you installed MAGMA in MAGMADIR, typically you can do this by adding $MAGMADIR/lib to LD_LIBRARY_PATH. E.g., with sh:

Code: Select all
    if [ -n "${LD_LIBRARY_PATH}" ] ; then
        OLD_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:"
    fi
    export LD_LIBRARY_PATH="${OLD_LD_LIBRARY_PATH}${MAGMADIR}/lib"


If you haven't installed MAGMA, then just set MAGMADIR to the source distribution, e.g., /path/to/magma-2.2.0

This can also be solved by linking using -rpath, which is what is done for the MAGMA testers.

-mark
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests