Re: [atlas-devel] calling atlas libs from f90
Brought to you by:
rwhaley,
tonyc040457
From: <wh...@cs...> - 2009-02-05 20:36:37
|
Mathew, >Sorry if this belongs on the tracker. I'm trying to call a blas routine >from fortran 90 code. Is this even possible? Arrays in f90 are not >necessarily contiguous but in f77 they are. I'm using the Absoft compiler. > >Is there anyway to hack around this with hurting performance too much? I would first confirm that the arrays in question are not contiguous; all the F90 compilers I knew back in the day actually copied array subsections to contiguous storage when you took a subsection. If F90 doesn't have an address operator, you can pass the addresses to C as ptrs for inspection. If the language doesn't have a way to convert any F90-only structures across language boundaries (ala JNI), then you should be able to trivally allocate an array which is contiguous, and copy to it. The performance hit from this should not be large if N is large (assuming level 3 BLAS or lapack). You might ask the absoft people what they do. At least back in the day, they used to use ATLAS to perform the built-in matmul operation . . . Cheers, Clint ************************************************************************** ** R. Clint Whaley, PhD ** Assist Prof, UTSA ** www.cs.utsa.edu/~whaley ** ************************************************************************** |