Re: question about efficiency of fortran in parallel environments



Hello,

On Fri, 27 May 2005 10:24:05 -0700, Randall Mackie
<rlmackie862@xxxxxxxxx> wrote:

<snip>

>One of the programmers in my company, who programs mainly in c,
>has said that my program could be made more efficient if it
>were converted from Fortran to C. I'm not sure I'm convinced
>of this at all, but I was hoping for some feedback from people
>who program in both Fortran and C, especially in parallel environments.

MPI is written in C, so there's an extra layer of call executed
for each MPI call. But that's one call/return per call.

An MPI procedure execution usually involves a switch to the OS
to start a communication (on both processes), then communicating
between processes. On a cluster, this means establishing
the logical connection between two processors.

Compared to which the extra call and return are very small.
Note that the extra call and return also apply to the C++ binding
as well.

>Other people (the PETSc programmers) have said it doesn't make any difference whether I use
>C or Fortran. But, we have to make a decision, and I'm afraid I
>don't know the correct answer as I seem to be getting conflicting
>advice. Any help would be appreciated.

Trying to learn a new programming language to save a clock cycle
here and there is unlikely to succeed.

As soon as you have an f03 compiler, you could call the C binding
directly from Fortran, and shave those few cycles as well.

>Thanks in advance.
>
>Randy Mackie

--
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.
.



Relevant Pages

  • Re: Help from fellow Fortran Users
    ... >> department head winced and commented that Fortran is no longer being ... Portability, for programs written in any language, depends on four ... A compiler that generates code for an AXP platform is not ... Some programmers are just so impressed with their own knowledge of the ...
    (comp.lang.fortran)
  • Re: question about efficiency of fortran in parallel environments
    ... > Other people (the PETSc programmers) have said it doesn't make any difference ... > whether I use C or Fortran. ... any particular language is the secret to efficiency. ... programmers can write highly efficient code in C. ...
    (comp.lang.fortran)
  • Re: A petition to J3 apropos FORTRANs future
    ... Fortran folded like an accordion and gave ... The vast majority of programmers are not doing "scientific ... In theory, programmers would just "use the best language for the job", ... But there are reasons, both real and silly, why one ...
    (comp.lang.fortran)
  • Re: Ten Commandments for Fortran Programming?
    ... As long as we take the view that Fortran is for number crunching, C is for OS interfacing, and Visual Basic is for quick and dirty GUIs, and we interpret statistics in light of how a particular language is presently used by a majority of users, we fail to acknowledge and encourage broader use of Fortran for other programming domains. ... This can be done without in any way destroying fundamental advantages of Fortran for number crunching or overburdening application programmers with superfluous features. ...
    (comp.lang.fortran)
  • Re: Fortran has little support for object-oriented
    ... Isn't cobol the Lingua Franca of business? ... quants as they are called as short for quantitative ... of advertising for interface programmers. ... ex-physicists so may have grown up doing Fortran. ...
    (comp.lang.fortran)