Magma Example gives wrong results

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

Magma Example gives wrong results

Postby Magma-Martin » Tue Jul 10, 2018 11:43 am

Hi,

First of all I'd like to thank you for your great work developing MAGMA. I just finished installing MAGMA and compiled the examples without any warnings or errors. But when I run example_sparse, I get just zeros in the result Vector. I tried to change the copy in the end from dx to db to see if it does anything and in this case I get the right output of the b values (3.0). When I try the example_sparse_operator example, I get the following output:

Code: Select all
iterations: 1 residual: 1.4828e+03
values:
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000
-1050.0000


The other two examples have no value outputs... I do not know, how to find the problem, because there are no errors or warnings when compiling. Maybe one of you can help me. I would love to test MAGMA in my application.

I am using Ubuntu 16.04 (gcc 5.4.0), CUDA 9.2 and a GTX 980
I used option 2 from here https://gist.github.com/pachamaltese/afc4faef2f191b533556f261a46b3aa8 to install MKL

and added the following lines in my .bashrc:

Code: Select all
#for magma
export CUDADIR=/usr/local/cuda
source /opt/intel/mkl/bin/mklvars.sh intel64
source /opt/intel/bin/compilervars.sh intel64
export LD_LIBRARY_PATH=/usr/local/magma/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}


I hope that someone can help me =)
Thanks in advance
Martin
Magma-Martin
 
Posts: 3
Joined: Tue Jul 10, 2018 11:16 am

Re: Magma Example gives wrong results

Postby hartwig anzt » Thu Jul 12, 2018 3:34 am

Dear Martin,

Thanks for reaching out!

I can reproduce the problem, however, I do not have a solution yet. As far as I can see, it is a memory-ownership issue. I am working on it. In the meanwhile, I want to point you to a different collaborative project that is aiming for a sustainable C++-based NLA package: https://github.com/ginkgo-project/ginkgo It does not yet have the functionality of MAGMA-sparse, but it is much more stable and if you are comfortable with C++, I recommend checking it out. There are also a few examples on the usage of Ginkgo.

In any case, I will try to fix this problem.

Thanks, Hartwig
hartwig anzt
 
Posts: 85
Joined: Tue Sep 02, 2014 5:44 pm

Re: Magma Example gives wrong results

Postby Magma-Martin » Thu Jul 12, 2018 4:52 am

Dear Hartwig,

I found a workaround using libopenblas from the ubuntu packages instead of MKL. Now, the examples run properly.
Thanks for your fast reply.

Thanks, Martin

Regarding ginkgo: I need a fast Sparse Conjugate Gradient implementation, handling multiple right hand sides for the same sparse matrix. Do you know, if ginkgo supports that, I did not find a nice dokumentation for Ginko. Or would MAGMA be the best candidate to use here?
Magma-Martin
 
Posts: 3
Joined: Tue Jul 10, 2018 11:16 am

Re: Magma Example gives wrong results

Postby Stan Tomov » Thu Jul 12, 2018 7:09 pm

Dear Martin,

Very good! So the problem was not in MAGMA?

Yes, we recommend using MAGMA. We support multiple right hand sides for CG
and have very highly optimized SpMM product that is used in this case! Tell us how it goes.

Best regards,
Stan
Stan Tomov
 
Posts: 262
Joined: Fri Aug 21, 2009 10:39 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest