Automatic parallelization in 4.3?
Tobias Burnus
burnus@net-b.de
Tue Oct 24 10:22:00 GMT 2006
Hi,
Craig Powers wrote:
>> I found one post by Zdenek Dvorak regarding auto-parallelization, but
>> it doesn't mention Fortran AFAICT. See
>> http://gcc.gnu.org/ml/gcc-patches/2006-09/msg01243.html
>
> One comment -- for my use of Fortran in a cluster environment, I
> actually prefer to avoid use of additional processor cores because
> they are controlled resources managed by the cluster's master
> scheduler. So if I were to use gfortran to build my group's code, I
> would prefer to be able to turn something like this off easily,
> preferably without compromising other optimizations.
To turn this off is easy: Don't use the -ftree-parallelize-loops=n (n =
number of threads) option.
Similarly to OpenMP (-fopenmp) you need to turn this option on
explicitly, if you want to use it.
(I don't know how well -ftree-parallelize-loops will work, but the
autoparallelization in ifort made one of my programs actually slightly
slower (on a dual-core AMD) than a single process [I don't know how
typical this is]. However, it is nice that GCC will have it.)
Tobias
More information about the Fortran
mailing list