Page 1 of 1

How to call from Fortran

Posted: Fri Nov 07, 2014 5:56 pm
by jrm4412
So, I've got MAGMA 1.5 up and running with Intel compilers/MKL 11.2 and Cuda 6.5 on a Tesla C2050 gpu. Unfortunately, I'm having trouble calling magma functions from Fortran.

I've made my own wrapper with C to call magma from Fortran, but I'm having some trouble and get this error: "cannot bind [matrix A] to texture: unknown error (30)". I can post the details of my code, but I'm wondering: is there any easier way to call magma from Fortran?

Many thanks.

Re: How to call from Fortran

Posted: Mon Nov 10, 2014 11:21 am
by mgates3
Can you provide some more details about what exact MAGMA functions you are calling, and how you calling that - how you are allocating memory and such. A snippet of your Fortran code would be great.

There are Fortran wrappers already in MAGMA. These are defined in control/magma_*f77.cpp and control/magma_*fortran.F90. Basically the same arguments as the C routine, but with magmaf_ prefix instead of magma_. The F90 modules (*.mod) should be in the include folder after compiling MAGMA.

-mark

Re: How to call from Fortran

Posted: Fri Nov 14, 2014 6:51 pm
by jrm4412
Thanks, Mark. I did have success using the Fortran wrappers that were provided. For ones that were not available (eg blas routines), I essentially rewrote the Cublas fortran_thunking interface to work with magma functions. I also added wrappers for init and finalize.