I am trying to use MAGMA in order to "dgesdd_" of Lapack call to "dgesdd" to Magma call.
I installed the magma in my local environment.
What I have done exactly is 1- #include "magma_d.h" and change function name from "dgesdd_" to "magma_dgesdd". Afaik, the function parameters are the same.
What am I missing and what should I do?
I hope someone can help me
Thanks
Porting a function from lapack to magma
Re: Porting a function from lapack to magma
Do you know if there is possible to use some containerized env to make it work? for example, using a docker container, which will contain all needed (SO, libs, etc)? thanks!
Re: Porting a function from lapack to magma
As shown in example/example_v2.c, you should include magma_v2.h.
Then replace LAPACK dgesdd_ with magma_dgesdd. The job parameter changes from a string to an enum. The dimensions change from int pointers to plain ints. I highly suggest doing a workspace query, as LAPACK and MAGMA will have different workspace size requirements.
dgesdd_( "some", &m, &n, A, &lda, ... )
becomes
magma_dgesdd( MagmaSomeVec, m, n, A, lda, ... )
Then link with the MAGMA, LAPACK, cuBLAS, and CUDA libraries.
From your post, it's unclear what difficulties you may be having — code isn't compiling, or it isn't linking, or it crashes when running, or gets the wrong answer. Please post exactly what you did and what went wrong.
Mark
Then replace LAPACK dgesdd_ with magma_dgesdd. The job parameter changes from a string to an enum. The dimensions change from int pointers to plain ints. I highly suggest doing a workspace query, as LAPACK and MAGMA will have different workspace size requirements.
dgesdd_( "some", &m, &n, A, &lda, ... )
becomes
magma_dgesdd( MagmaSomeVec, m, n, A, lda, ... )
Then link with the MAGMA, LAPACK, cuBLAS, and CUDA libraries.
From your post, it's unclear what difficulties you may be having — code isn't compiling, or it isn't linking, or it crashes when running, or gets the wrong answer. Please post exactly what you did and what went wrong.
Mark