Subject: do construct

From: Shi Lixia <[email-masked]>
Date: Sat, 3 May 1997 09:22:14 +0900 (TAIDT)

I think that it is necessary to deal with do construct. Its work
includes data dependence analyse,data distribute ,computation partition,
and communition detection.
       According to grammar rules,do construct is very complicated because
it includes all kinds of statements and construct within its body. So
dealing with do is equal to dealing with all kinds of statements and
constructs. 
       Data dependence analyse is important. But it is difficult. It can
not be finished in the short_term. So firstly we assume that there is no
data dependence. It seems that do is relatively simple. I takes it as
" simple do ". If " simple do " is done perfectly, I will make a data 
dependence analyse tool.  A whole do is made up of " simple do" and data
dependence analyse within the parallel program.
       In your opinion, it is unnecessary for do construct to partition
computation. In every node program, there is a copy of do. That is to say,
if do's lower_bound, up_bound and step are l, u ,s respectively in the
source program, then they are still l,u,s in the node program. Is it
right? If it is so, we don't turn sequential do into parallel do. But it 
is not  what we have expected.
       Do you understand me?

shi li xia

---

From: Shi Lixia <[email-masked]>
Date: Sun, 4 May 1997 09:10:55 +0900 (TAIDT)

On Fri, 2 May 1997, Guansong Zhang wrote:

> On May 3,  9:22am, Shi Lixia wrote:
> > Subject: do construct
> >
> >
> >
> I think I understand what you are trying to say. The problem seems we miss some
> basic points.
> 
> First, how do you want the node program to be executed?
> 
> The node program generated by trans0 is a sequential program which can be
> executed in SPMD mode on multiprocessors. You can not further partition the
> computation in each node program. Can you?
> 
> Second, what is tof77 used for?
> 
> The tof77 should be a program translating standard F90 program into F77 program
> on a single machine environment, so we can deal with the problem that some
> machine do not have the f90 compiler.
> 
> You know that the HPF is base on F90, F95, instead of F77. But we want a F77
> node program. So one simple way to do this is to generate a F90 node program
> then change it to F77, rather than let node program generation do too much
> work.
> 
> We should further discuss this if you have any questions.
> 
> Have a nice week end.
> 
> Guansong
> 
> 
> 
   At first, I must declare that do construct is done in tran0. So when I
deal with do construct, it is still source program rather than node
program. I think that do construct and forall statement are equal.

   Second,tof77 only deals with type declaration statements . tof77 makes
them be fit for f77's grammar rules.

shi li xia

---

From: Zheng Gengbin <[email-masked]>
Date: Sun, 4 May 1997 18:44:29 +0800 (EAT)

> program. I think that do construct and forall statement are equal.

	Do construct must do a lot of work similar with forall statement ,
such as the loop range generation , communication detection and computing
division . This work is done in trans0 instead of in tof77 , it have 
nothing to do with the tof77 .

> them be fit for f77's grammar rules.

	tof77 is exactly as what you describe above . This pass will translate
the f90 grammar into f77 equally . Now we have worked out  these grammar
structures : variable declaration statement ( strip the attribute clauses
to separate statements ) , allocate statement ( use stack operation to
simulate the allocate ) .

	To broaden the work done by tof77 , these grammar of f90 must be 
considered :

1. f90 function vs f77
   It is legal for f90 to return a result of type array , while f77 cannot .
    ( this seems a big problem )

2. derived type      

3. pointer

4. module ( this is to be abandoned because it is too complex)

> shi li xia    

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Mon, 5 May 1997 09:19:42 +0800 (EAT)

> 
> It seems I don't understand the situation well, why don't we consider tof77 as
> a standard f90 to f77 convertor? In these case the output of our hpf compiler
> can be in f90 and if needed, to f77.
>

	I don't agree this . You know our hpf compiler only deal with
data mapping directives , forall statements and io statement ,etc . In one 
word , we only process the parallel structures in HPF , and simply left
other grammar structure untouched . 
	So in fact our current hpf compiler(trans0) do give the output of f90 
grammar , don't you think so ?

> Currently our hpf compiler's input is based on f77 and data mapping derectives,
> if this is to be kept, we won't produce node program with f90 function
> features, derived types, modules. (Though we do need allocatable arrays if we
> want to support things like NUMBER_OF_PROCESSOR function. But it can also be
> done on stacks as we allocate temp array for data movement.)
> 

	I don't think our compile will be limited to only take the f77 plus
data mapping directives as the input . If that is the case , we never need
tof77. Our goal is to let hpf compiler take more general HPF grammar .

> In this case, it is unparse should be adjust a little, to get ride of those :
> and so on, instead of adding another pass as tof77.
> 

	Of course , unparse will improved a little to take some flag as
its arguments to tell it to unparse as f77 or HPF .

> If we want something more, like we want to support f90 features in hpf input
> program, then it seems reasonable to produce the node program as f90 instead of
> f77. If we need f77 very much, then we can do something more to convert f90
> program into f77 program.
> 

	I think our hpf compiler (till trans0) should produce the f90 output,
tof77 don't deal with any grammar concerned with parallel , it should be a
pure f90 to f77 converter.

Zheng

---

From: Shi Lixia <[email-masked]>
Date: Tue, 6 May 1997 08:58:26 +0900 (TAIDT)

Now I can tell you that I was ever responsible for tof77. At 
that time, it was aimed at type declaration statements. Recently Zheng
has added something about function header. 
         I hear that you use f90's compiler. It seems that toff77 is 
unnecessary for you. While we adopt f77's compiler , it is necessssary
to do tof77 for us. There is still much work to do in tof77.

shi li xia