Subject: Re: your mail

From: Zheng Gengbin <[email-masked]>
Date: Fri, 19 Sep 1997 08:43:00 +0800 (EAT)

I almost forgot , the passwd of our account 'pact' changed to pact1997.

Gengbin

---

From: Zheng Gengbin <[email-masked]>
Date: Fri, 19 Sep 1997 11:04:54 +0800 (EAT)

On Thu, 18 Sep 1997, Bryan Carpenter wrote:

> > 
> > On Wed, 17 Sep 1997, Bryan Carpenter wrote:
> > 
> > 	Thank you for your explaination on the diagonal array definition. It
> > seems we have to improve fortran interface to support this . As to your 
> >   over(x)
> >     at(y | x)
> >       a [[x, y]] = 3 ;
> > 
> > I cannot find the function over() in Adlib kernel . Is that in your new
> > version?
> 
> Sorry---that isn't a function.  It's a construct in our new HPJava
> language.  It's equivalent to the WHERE construct in ad++.  I'll
> send you the (incomplete) documentation of Adlib in the next day or two,
> now we have re-established contact.  That discusses the WHERE construct
> in too much detail.
> 
> > 
> > 
> > 	I have another question about transforamtion functions .
> > 	In previous days , we wrote fortran interface on  the transformation 
> > functions defined in transformation.h .
> > 
> > 	When I try this:
> > 
> > 	integer a(4),b(4,4)
> > 	forall (i=1:4)  a(i)=sum(b(i,:))
> > 
> > 	I found something strange , if index is from 1 to 4 , which is the
> > range of the a declaration , it runs ok. But if the loop is from 1 to 3 , 
> > which do not cover the whole range of a , it failed .
> > 
> > 	At last I figure out , it seems sum() ( which is a reduce function)
> > must be performed by all the processors to sum out the value . Maybe
> > when we devide the computing according to owner-computing rule , some 
> > processors is idle and don't execute the sum() , so the sum() functions
> > failed to run properly. Is that right ? If so , it will be very difficult
> > to support such kind of intrinsic functions in forall . Have you any 
> > idea?
> 
> I'm glad you raised this point.  It was one of the design goals of Adlib
> to support this kind of nested parallelism.  It should work fine, so
> long as you ensure that you set the Adlib global variable `apg'
> properly inside the forall.  The ``active process group'' is the actual
> set of processes working together at a particular point in the
> program.  The collective communcation operations determine this set by
> looking at the static variable `apg'.  Again, the new documentation
> discusses this in more detail than you probably want to know.
> 

	When I added print statement in Fortran node program to debug ,
I found all 4 processor do the work.
This is the node problem:
 
       if (pcrc_on (pcrc_group (pcrc_sdd0))) then
          do  j=0,(pcrc_liu_j-pcrc_lil_j)/pcrc_lis_j,1
            do  i=0,(pcrc_liu_i-pcrc_lil_i)/pcrc_lis_i,1
               pcrc_tdd10 = pcrc_new_array_data (a(pcrc_sdx0),pcrc_integ&
     &er,pcrc_size_integer,0,pcrc_grp_glob)
(1)            call pcrc_int_sum (a(pcrc_sdx0),pcrc_tdd10,b(0),pcrc_dad_&
     &b)
               call pcrc_delete_array (pcrc_tdd10)
            enddo
         enddo
       endif

	The problem is after  we devide the computation , only 3 processors 
can reach the statement (1) and exe cute it, as the boundry of index i,j is 
defined . Now the problem is here , with the absent of the other processor , 
can sum() give correct result ? I guess it cannot .

gengbin