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
Use Magma from Fortran Code
-
Stan Tomov
- Posts: 283
- Joined: Fri Aug 21, 2009 10:39 pm
Re: Use Magma from Fortran Code
Hello,
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):
We have already done these interfaces for the main LAPACK functions (e.g., see control/magma_df77.cpp).
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);
}