With barely any knowledge of HPF, and the reduced brain activity of a
Friday evening: Does this requirement for synchronization points extend
to internal procedures? Their main purpose is to allow inlining, so I
would hope not.
The include statement is perfectly good Fortran and doesn't need a
preprocessor, so you could make your dot product available via
contains
include "dotproduct.f90"
near the end of each routine that uses it.
Are there any (stylistic or other) objections against this approach?
Herbert
Aleksandar Donev wrote:
>
> Hello,
>
> I have a problem which is mostly relevant to HPF, but is related to a
> non-existant feature in Fortran--inlined procedures. In the heart of my
> HPF program is a conjugate gradient solver which often needs to perform
> vector updates and dot products. This is easy to do by placing these in
> subroutines. But, according to HPF syntax, all processors need to be
> synchronized before and after a subroutine call, so that my HPF compiler
> will insert three sync points for a single dot product.
>
> There are two ways I know of to solve this. One is to use the low level
> HPF_LOCAL model, but this is clumsy. The other is to use inlined
> functions for DotProduct and VectorUpdate (note that the intrinsic
> DOT_PRODUCT has certain issues, so I need to write my own routine!),
> which would avoid the synchronizations. Since Fortran does not offer
> this functionality, I have to do it probably using a preprocessor.
> Is this a good idea? I've always thought of good programming as making
> procedures for things and putting them in well organized modules. This
> would make my routines not standard conforming and not in a module?
> Anybody have better ideas?
>
> Thanks,
> Aleksandar
>
> --
> _____________________________________________
> Aleksandar Donev
> Physics Department
> Michigan State University
> East Lansing, MI 48824-1116
> E-mail: [log in to unmask]
> Work phone: (517) 432-6770
> _____________________________________________
--
******************************************************
* Herbert Fruchtl Tel.: +44-(0)20-8606-4650 *
* FECIT Fax: +44-(0)20-8606-4422 *
* 2 Longwalk Road email: [log in to unmask] *
* Stockley Park *
* Uxbridge UB11 1AB, United Kingdom *
******************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|