Re: calling LAPACK from C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2004-11-11 at 19:02 -0800, Globe Trotter wrote:
> Hi,
> 
> I am trying to call LAPACK from C on FC2 and I was wondering how to use dynamic
> memory allocation here. In other words, I want to use one of these routines
> (written in Fortran) in LAPACK, and I want to be able to set the size of the
> arrays based on the application. How do I allocate memory dynamically in C,
> such that I can pass it on through Fortran functions. An example would be
> really nice. 

Hi Globe,

For calls between Fortran and C take a look at:

  http://www-zeus.desy.de/~burow/cfortran/

which works very nicely for GCC and g77.  And then see one of the many
references for "row major" (C) versus "column major" (Fortran) layout
such as:

  http://sources.redhat.com/ml/gsl-discuss/2000/msg00425.html

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3@xxxxxxx                ed@xxxxxxx
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux