Re: gfortran, g95, and dual-core



Charles Russell wrote:
FX wrote:
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.

I don't understand how the makefile matters, but I'm using fortran 77
and avoid the complications introduced by modules.
Typically, a makefile for a large program contains large sections which
can build in parallel with each other. However, if you make a single
modification and rebuild, a large section with no internal build
parallelism gets rebuilt. For example,(with f77 code) if the makefile
runs fsplit on a single source file, causes each subroutine to be
rebuilt separately, then combines individual objects into a single large
object, make doesn't automatically see the possibility of building the
individual objects in parallel.
Do you think the current dual- and quad-core processors are
just the first steps in a sequence, and that mass-market computers will
soon become massively parallel?
There is little question about the massively parallel GPUs going into
production. The question is how long it will take to get adequate
Fortran support.

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.

1) Will this conflict with any of the debugging options?
2) Will this work with fortran 77 code?


I assume it will be a direct extension of OpenMP and will raise few new
issues. Some of the debugging options involve removing the parallel
compiler switch and re-checking the serial version. When auto-parallel
shows me an opportunity for parallelism, I want to solidify it as
OpenMP, and f77 makes that easier (provided that you have already
optimized the nested loops).
.



Relevant Pages

  • Re: gfortran, g95, and dual-core
    ... Speed of compilation: if you compile single source files, ... makefile, you will gain. ... For execution speed, there are two ways to go. ...
    (comp.lang.fortran)
  • Re: Using Makefile rather than GreenHills (GHS) Multi .GPJ files
    ... you've done something weird if you are dependant on the order files are passed to the linker - it is better to make use of specific sections or specific linker control files as needed. ... A random C file appearing in the source tree (e.g. a temporary copy of one of the source files) shouldn't become part of the build just like that. ... Relevant files are in the correct place, the symbol definitions are collected together in a single "configuration" header file, and it's easy to see which parts of the project are included in the compilation, and easy to change those choices. ... Changing dependant headers shouldn't require changes to the makefile, ...
    (comp.arch.embedded)
  • Re: FIle corruption on HPFS partition
    ... These files are frequently edited and compiled, so there is a lot of file activity on this partition. ... source files on the disk too. ... except for the compilation of one source file that failed. ... As to the hard disk, it's a travelstar abount four years old. ...
    (comp.os.os2.misc)
  • Re: FIle corruption on HPFS partition
    ... HPFS does not corrupt files. ... source files on the disk too. ... except for the compilation of one ... As to the hard disk, it's a travelstar abount four years old. ...
    (comp.os.os2.misc)
  • Re: Im getting frustrated and angry!
    ... foo.o is never dependent on bar.o thus there cannot be circular dependencies. ... There basically are two models of compilation, the C way where everything is in textual source code or the Java way where the compiler uses the output of the compilation of other sources rather than the text itself. ... "Safeness of make-based incremental compilation, the key result of this paper, can be stated as follows: Suppose we build a program brute-force, and then edit the source files, and possibly the makefile as well. ...
    (comp.lang.java.help)