Re: gfortran, g95, and dual-core



Can gfortran or g95 gain anything from dual- or multi-core processors
in either speed of compilation or speed of execution?

Speed of compilation: if you compile single source files, there probably
isn't anything to gain. If your code has multiple source files, it will
depend on your compilation process, but if you use a decently written
makefile, you will gain.

For execution speed, there are two ways to go. The standard way to get
there is to parallelize the code yourself, either with MPI (probably
requires costly and invasive changes, but will work for distributed
memory systems as well as the multicore scenarios), which can work with
any compiler, or OpenMP. OpenMP is less invasive, you can quickly
parallelize a few hot spots in your code in under an hour (make that a
few hours, if it's your first time), but it requires compiler support,
which gfortran has but g95 hasn't.

The other way is to not touch your code at all, and ask your compile rfor
autoparallelization. Gains from this will usually be relatively small,
but you have little to lose. This also requires support from the
compiler, which is not present in g95, and will be present in gfortran
only starting with the next release series (4.3.x). For more information
about autoparallelization, others might know more than what I said above.

PS: Of course, if your code heavily relies on external libraries, it
could be as simple as using a parallel version of the libraries.

--
FX
.



Relevant Pages

  • Re: The principle of include files in PHP, not as in C++
    ... Compilation is not the same as execution. ... In PHP they are executed. ... We're talking about source files including other source files. ...
    (comp.lang.php)
  • Re: gfortran, g95, and dual-core
    ... Speed of compilation: if you compile single source files, ... makefile, you will gain. ...
    (comp.lang.fortran)
  • Re: error
    ... The option that I helped you turn off speeds up compilation by compiling a ... set of headers once and saving the results of that compilation. ... complexity for a gain in speed: ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vc)
  • Re: huge array
    ... or do you know a CPU which can handle something like "FOR I = 1 TO ... The dot net JIT compilers *do* interpret pseudo code (or whatever ... parsing and execution are two separate steps. ... compilation happens in two phases ...
    (microsoft.public.vb.general.discussion)
  • Re: huge array
    ... or do you know a CPU which can handle something like "FOR I = 1 TO ... There is a huge difference between interpeted code and native code. ... parsing and execution are two separate steps. ... compilation happens in two phases ...
    (microsoft.public.vb.general.discussion)