Re: Who uses clapack?

From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 12/10/04


Date: 10 Dec 2004 17:31:03 GMT

In <1gokq2z.1qtze21fbcwaoN%see.sig@for.addy> see.sig@for.addy (Victor Eijkhout) writes:

>The authors of lapack/scalapack are starting to work on a new release of
>these packages. One of the things we want to address is the sillyness
>that C users, instead of linking to the binaries of the Fortran version,
>use an automatically translated C version.
>
>Therefore we'd like to know precisely what the reasons for this are.
>
>Naively one would say, compile the Fortran version, append an underscore
>(when appropriate) to routine names, and just link those libraries to
>your object files.
>
>What are the gotchas, and what are the real stumbling blocks here?
>Please spell it out in as much detail as you can muster. This situation
>really needs to improve.

The issue that springs to mind is that Fortran and C store matrices
differently: Fortran does it column-wise (the first index varies fastest),
C does it row-wise (the last index varies fastest).

The fact that Fortran array indexing is 1-based (by default) and C array
indexing is 0-based shouldn't cause any problems when using the compiled
Fortran code from C.

Dan

-- 
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
           Currently looking for a job in the European Union


Relevant Pages

  • Re: [OT] Commodore 64 BASIC (was: Interesting bug)
    ... >situation with the Fortran version Dan Pop grew up with. ... Each program unit had its own ... of the loop was executed once instead of 5 times. ...
    (comp.lang.c)
  • Re: [OT] Commodore 64 BASIC (was: Interesting bug)
    ... >>situation with the Fortran version Dan Pop grew up with. ... > of the loop was executed once instead of 5 times. ... This is a classic bug story, about which a great deal of ...
    (comp.lang.c)
  • Re: Who uses clapack?
    ... >that C users, instead of linking to the binaries of the Fortran version, ... C does it row-wise (the last index varies fastest). ... The fact that Fortran array indexing is 1-based and C array ... Dan Pop ...
    (comp.lang.c)
  • Re: Who uses clapack?
    ... >that C users, instead of linking to the binaries of the Fortran version, ... C does it row-wise (the last index varies fastest). ... The fact that Fortran array indexing is 1-based and C array ... Dan Pop ...
    (sci.math.num-analysis)
  • Re: [OT] convert C code to Fortran
    ... >providing interfaces, creating the right headers and intelligent ... The real problem is that the solution is not portable. ... interfacing C and Fortran are highly system specific. ... Dan Pop ...
    (comp.lang.c)

Loading