Subject: Re: 1.75

From: Zheng Gengbin <[email-masked]>
Date: Wed, 2 Apr 1997 10:21:13 +0800 (EAT)

On Mon, 31 Mar 1997, Guansong Zhang wrote:

> On Mar 31,  8:44am, Zheng Gengbin wrote:
> >
> > 	You can add this line in detect_comm.C in line 137 , like this:
> > int devide(int s1,int s2)
> > {
> >         int s = s1 / s2;
> >         int q = s1 % s2;
> > printf("%d/%d : %d,%d\n",s1,s2,s,q);
> >         if (q>0) s++;
> >         else if (q<0) s--;
> >         return s;
> > }
> >
> > you will get the result .
> >
> 
> Thank you. I think this time I pinpoint the problem. It comes from
> get_partitioned_dim and detect_communication.
> 
> The second one should be improved any way, I will explain to you the reason
> later. The first one used to be a very simple function, but now since we try to
> support align permutation and replication, things may be complicated a little.
> So could you please let me know your new defination of Alignment_def, how do
> you record align replicate, and I will rewrite this function.
> 

	I have added 2 member variable in it :
  int align_with_dim;  // this record the dimension of the align with 
				subscript dimension .
  int align_pair[MAX_ALIGN_DIM]; // this record the align pair dimension .

> Also, I compare the node generation part in your 1.75, it seems your change
> have nothing to do with these two functions. I don't know how you shot cut
> them. I think it is better doing in my way, because a lot of thing need to be
> done in this part.
> 

	For the first function , I use align_with_dim and align_pair (descirbe 
above) to get the right dimension of align with  . You can find this in
defintion.C line 261 of mine version , there is a line :

int to_dim = adef->getAlignPair(j)+1;

which will get the counterpart of align with.

	For the second function , I add several in detect_comm.C in line 31:

 // I don't know if numProcs is zero , what will happen ? zheng.gb
  if (numProcs == 0) {
        printf("Number of Procs is zero ,assume no communication.\n");
        return 0;
  }

	So , here I assume if the dimension is collapsed , there is no
need to communicate ( so 0 is returned ).

> Another thing, you are right about the array size. I have already change my
> code as you did in 1.75. (But I don't change other part yet.) I hope in the
> same time you can improve data mapping format transformation, so they do not
> have side effects on node program generation.
> 

	Which data mapping format transformation?

> Guansong
> 
> 
> P.S.
> 
> Don't worry about the core dump of forall3 and forall4 on hp, it should be OK
> after I change the above two functions. The current code seems a mistake rather
> than a bug!
> 
> Who is responsible for tof77? I like to know how he want to deal f90 unparse
> problem. I think a little more than one week, a new Adlib will be released. I
> hope we can smooth the compiling process both on machine with f90 and without.
> 
> 

	Shi Lixia is responsible tof77 . Our strategy is to translate f90
statement to standard f77 . She have finished the variable declaration 
statemnt and allocate statement .  We have not think about the unparse
problem . As I think , we can add some new standard f77 statement variant
in tags , and tell unparser to unparse it like f77 standard .

Zheng