Subject: About interface

From: Zheng Gengbin <[email-masked]>
Date: Sun, 27 Apr 1997 10:15:20 +0800 (EAT)

Now , I am  considering data mapping in subproblem interface .
It is clear that if there is an explicit interface for the called subprogram,
and that interface contains prescriptive or descriptive mapping 
directives for a dummy argument ,the call should proceed as if the data 
was copied to a temporary variable to match the mapping of the dummy 
arguments as descibed .
	The problem is when remap the dummy , some new Template and 
Processors must be created as described in interface . This will make
the node program looks clumsy and sometimes the name will be duplicate .
This also cause two processor definition in a scope . But I don't think
this will cause problem .
	I wonder if you have any idea about this .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Mon, 28 Apr 1997 09:54:33 +0800 (EAT)

On Sun, 27 Apr 1997, Guansong Zhang wrote:

> On Apr 27, 10:15am, Zheng Gengbin wrote:
> > Subject: About interface
> >
> >-- End of excerpt from Zheng Gengbin
> 
> I don't understand this well. Please give me an example.
> 
> >From Adlib point of view, adding a same shape processor group would cause real
> problem. But from compiler point of view, this may change the semantics of the
> source program. So we should avoid this if possible.
> 
> Guansong
> 

	For example :

        subroutine ff(b)
        integer b(10)
!HPF$   processors  p(4)
!HPF$   distribute b(block) onto p
        end

        program main
        interface f
                subroutine ff(b)
                integer b(10)
!HPF$   processors  p(4)
!HPF$  distribute b(block) onto p
                end subroutine
        end interface

        integer a(2:20)
        call f(a(3:10))
        end

	when we deal with the proc call statement , trans0 have create the
dad section for a(3:10) , next I want to do the data mapping for the dad 
created according to the specification in the interface . here we have 
another proccessors p(4) defined in the interface . So in order to 
set_array_distribute the dad of a(3:10) ,, i must  first create the 
processor declaration statement and the processor create statement .  It  
is possible that the main scope also have a processor p declared .To make 
things worse , if align and template appear in ther interface , I have to 
create the template also , which make the node program complicated . ANd
this work must  be repeatedly done in the every entry of call .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Tue, 29 Apr 1997 22:39:49 +0800 (EAT)

On Tue, 29 Apr 1997, Guansong Zhang wrote:

> On Apr 29, 10:37am, Zheng Gengbin wrote:
> > Subject: Re: About interface
> > On Mon, 28 Apr 1997, Guansong Zhang wrote:
> >
> > > Now, I seems to understand what the problem is. Let me describe it in this
> way,
> > > see if correct.
> > >
> > > Translating call statement with interface, we need to create addtional
> > > processor array, and template in the main program. These processor array
> and
> > > template is corresponding to the one in subprograms.
> > >
> > > Is this really a problem?
> > >
> >
> >
> > 	This seems the only way we must follow . To deal with a function
> > call , we must first create new DAD for the array(copy dad)  or array
> > section (set_array_triplet) . Then declare and create all processors and
> > templates according to the subprogram interface , after this
> > set_array_align or set_array_distribute the newly created dad to generate the
> > correct data mapping . At last modify the call statement by adding dad as
> > actual arguments . During the analyse of the interface , the data mapping
> > information is collected , and duplicated processor or tempplate names are
> > to be avoided by generate the name according to their function names .
> > 	You can see to transform such a simple function call , a lot
> > of work is involved .
> >
> 
> But I don't see any way we can surround it. It means for each interface in the
> program, there should be some additional overhead. And think about the call can
> be in DO construct, especially in independent do construnct, it seems worth it.
> 

	Then as I understand , we will create all the processor and template
definitions in all of the interface once in the entry of the main program 
instead of before every entry of the call statement .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Tue, 29 Apr 1997 22:43:18 +0800 (EAT)

On Tue, 29 Apr 1997, Guansong Zhang wrote:

> > > I am more concerned with the trans1 part, we can not pass some program due
> to
> > > the little bug I mentioned previously. I hope you fix it first.
> > >
> >
> >
> > 	This part has been alreay fixed . I will give you the latest
> > version . The problem is that the trans0 here is not stable , so I am
> > hesitate to give a new version .
> >
> 
> 
> In that case, please pack trans1 and put some where I can get. Please make sure
> trans1 don't cause new problem to trans0, you can see this by those existing
> test in simple dir. Then we may pass at least two real program. Otherwise all
> we can say are those template programs.
> 

	I have put trans1.tar.gz on the HP , you can fetch it now .

> 
> By the way, why trans0 still doesn't work well at your place? I thought the
> problem was solved. What is wrong again?
> 
> 

	I mean I am changing the trans0 to support call statment with interface,
it is not ready yet .

Zheng