Re: gfortran, g95, and dual-core
- From: Charles Russell <NOSPAM@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 08:09:29 -0600
FX wrote:
I don't understand how the makefile matters, but I'm using fortran 77 and avoid the complications introduced by modules.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.
That offers food for thought. My slow programs are either Monte Carlo calculations or else have as bottleneck the calculation of finite-difference gradients, both of which offer obvious opportunities. On the other hand, I would not make my life more complicated for less than an order-of-magnitude gain, which would require at least 10 processors. 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?
1) Will this conflict with any of the debugging options?
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.
2) Will this work with fortran 77 code?
PS: Of course, if your code heavily relies on external libraries, it
could be as simple as using a parallel version of the libraries.
.
- Follow-Ups:
- Re: gfortran, g95, and dual-core
- From: Charles Russell
- Re: gfortran, g95, and dual-core
- From: Tim Prince
- Re: gfortran, g95, and dual-core
- References:
- gfortran, g95, and dual-core
- From: Charles Russell
- Re: gfortran, g95, and dual-core
- From: FX
- gfortran, g95, and dual-core
- Prev by Date: Re: Updated Compiler Comparisons
- Next by Date: Re: gfortran, g95, and dual-core
- Previous by thread: Re: gfortran, g95, and dual-core
- Next by thread: Re: gfortran, g95, and dual-core
- Index(es):
Relevant Pages
|