Use Magma from Fortran Code

Open discussion for MAGMA

Use Magma from Fortran Code

Postby GandalfCorvoTempesta » Mon Sep 05, 2011 5:28 am

Goodmorning at all .
I have a question about Magma .
Can i have en example to call a magma_dgemm in fortran ?
I use ifort compilator .
Thanks at all
Posts: 1
Joined: Mon Sep 05, 2011 5:25 am

Re: Use Magma from Fortran Code

Postby Stan Tomov » Thu Sep 08, 2011 3:22 pm

Your question reminds me that we must add FORTRAN interfaces to MAGMABLAS.
If you need it before we do this, you can look at the testing_dgetrf_gpu_f.f90 example.
You can properly modify it to call magmablasf_dgemm where magmablasf_dgemm would be the FORTRAN interface (has to be compiled and linked to the executable):
Code: Select all
void MAGMABLASF_DGEMM( char *transa, char *transb,
                       int *m, int *n, int *k, double *alpha,
                       devptr_t *dA, int *lda, devptr_t *dB, int *ldb,
                       double *beta, devptr_t *dC, int *ldc)
    magmablas_dgemm( transa[0], transb[0], *m, *n, *k,
                      *alpha, DEVPTR(dA), *lda, DEVPTR(dB), *ldb, beta, DEVPTR(dC), ldc);

We have already done these interfaces for the main LAPACK functions (e.g., see control/magma_df77.cpp).
Stan Tomov
Posts: 249
Joined: Fri Aug 21, 2009 10:39 pm

Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests