Subject: About runtime support

From: Zheng Gengbin <[email-masked]>
Date: Thu, 21 Nov 1996 19:15:39 +0800 (EAT)

Hi,

	Now , at last we can make the runtime support run on our RS6000 . So 
I made a conclusion that g++ cannot be used to compile Adlib and interface and 
bind c++ and fortran togather , we have to use local C++ compiler such 
as xlC to do the compilation . This I think is a serious problem which will 
influence the portability of the project .

	Here is the result of runing the 5 template :
	We can run template1 succefully and produce right output , while 
template 2-5 fail , 

when ran template2 , I got such errors:

>prun 4 temp2
mpirun -pg -machinefile ./machines -np 4 temp2

Aborting program!
Range :: subrng: subrange out of range
p3_23812:  p4_error: : 1
rm_l_-262949096_22022:  p4_error: interrupt SIGINT: 2
Aborting program!
Range :: subrng: subrange out of range
Aborting program!
Range :: subrng: subrange out of range
Range :: subrng: subrange out of range
p2_22780:  p4_error: : 1
rm_l_-262949096_18174:  p4_error: interrupt SIGINT: 2
p1_11508:  p4_error: : 1
rm_l_0_21238:  p4_error: interrupt SIGINT: 2
Aborting program!
p0_23276:  p4_error: : 1
bm_list_21486:  p4_error: interrupt SIGINT: 2

Please give me some suggestions.

PS,
I don't know why transG cannot produce the correct functions directly ,
so that I need not to add a _ after every pcrc functions ,though i can use a
shell script to solve this problem .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Fri, 22 Nov 1996 14:15:18 +0800 (EAT)

Guangsong , please notice the problem of template 2 below !

On Thu, 21 Nov 1996, Yuhong Wen wrote:

> Actually we didn't use g++ to compile our Adlib and interface. We just use a
> local C++ compiler to deal with it. Why must we use g++?
>

	Because on many platform , there are no local c++ compiler , except
free g++ .

> This is because your HPF source program has out-of-range in an array
> calculation in some places. You can check to find out that.
>

	Guangsong , I find out this is a bug when transG produce the node
program , notice this in node program of template 2 :
 
    (in function FOO() )
     call pcrc_reset_push_bounds_(pcrc_dad_Y,1,0,pcrc_alb_Y0,pcrc_aub_Y&
     &0,pcrc_ast_Y0)

	the lb should not be 0 but 1 . Since in fortran the default lowest 
bound should be 1. I have tested this . It is the reason why template 2 
cannot run .

	Next , I read your code on this function , I found an error :

            if (size->numberOfItems()!=0)
              // modified by zheng.gb   1996/11/22
              //start = new SgValueExp (size->item(0)->valueInteger());
              start = new SgValueExp(size->item(0)?size->item(0)->valueInteger():1);
            else
              start = new SgValueExp (1);

	I have change that , template 2 now is Ok .

  As to template 3 , your transG seems forgot to create the pcrc_dad_Y for
the Y(50) in subroutine FOO . After I insert the code to create the 
dad manuuallt into the nodeprogram , it is ok now . Please check it .

  As to template 4 , I found transG cannot deal good with the scalar 
variable, it also try to use the dad of the scalar variable n 
(pcrc_dad_n) , which is never defined in node program .

> When Fortran program call C or C++ functions, you should add a "_" after the
> function name, or before the function name, or the same name in C or C++
> programs. This is dependent on the compiler ( actually the link ) you use.
> Currently in our compiler, we should add a "_" after the function name in C
> programs. So that's the problem.
> 

	In our RS6000 , it seems they are of same function name .

> Because this is just an experiment system now, you can deal with this manually.
> We can write an install program to automaticlly deal with that according to
> different compilers later.
> 
> >
> > Zheng
> >-- End of excerpt from Zheng Gengbin
> 
> 
> PS::
> If you have more problems, please let me know, or you can give me an account to
> let me work on that by hand.
> 

	Ok , this is an account on 162.105.122.1 , the account name and 
password are same as HP . you can use f2f to correct problem cause by 
'_' here.

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Sat, 23 Nov 1996 09:11:57 +0800 (EAT)

On Fri, 22 Nov 1996, Guansong Zhang wrote:

> >               start = new
> SgValueExp(size->item(0)?size->item(0)->valueInteger():1);
> >             else
> I check this code. You change is right. At first I don't know what kind of
> program you are testing. And I don't expect that item(0) is possible NULL, when
> numberOfItems!=0
> 
> Now everything is OK.
> 

	See template 4 in our machine :
	
      pcrc_irg0 = pcrc_new_range_loop_(2,0,1,1,0,pcrc_rng_(pcrc_dad_x,1)&
     &)                                  ^

	the upper bound should be variable n instead of 0 , this made the 
problem .

	Read your code , I found this error in transforall.C ,line 42 ,

for (int j=0; j<3; j++) {
          if (fhdef->getindextriple(i, j)!=NULL) {
//   modified by zheng.gb
//          SgValueExp * strideExp = new SgValueExp(fhdef->getindextriple(i, j)-
>valueInteger());
            SgExpression * strideExp = fhdef->getindextriple(i, j);
            functionexpr->addArg(*strideExp);
          }
          else {
            SgValueExp * strideexp = new SgValueExp(1);
            functionexpr->addArg(*strideexp);
          }
        }

	The bound may be some expression with variable , donot make them as 
integer value by using the function valueInteger ,they are not always be 
integer constant .

	After my modification now the situation is template1 ,2,4 is ok on our 
machine . 

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Mon, 25 Nov 1996 10:20:24 +0800 (EAT)

On Sat, 23 Nov 1996, Guansong Zhang wrote:

> I don't check it yet. This time I assume you are right. But I don't think it is
> good idea for us to work on this kind of thing at present time. This will take
> you a lot of time to read my code.
>

	My way is quite simple , it take little time . Because we want to
see the templates runable on our machine . For these minor errors , I want to
get rid of them quickly .

> In fact, I want to work with you on more interesting subject: Make xsageop
> really part of our project. (At present time I don't think it is, its quality
> is quite poor compared with other parts in our project.) You can leave trans*
> to Yanmi.
> 

	Someone in our group is about to do a test on this xsageop , with the
experience when I wrote the transBD with Du and Yan , I think xsageop have
no serious problem itself ,the only thing we should do is to have a 
global test or improve it gradually by using it.  

> With the experience we got in the last few months I am quite sure that we
> together can build up something really wonderful for compiler developers.
> 
> Prof. Li told me that he once discussed this with Prof Xu. I don't know your
> opinion about it yet.
> 
> If you agree, we may discuss this more detailly. I already have a primary idea,
> I think we can polish it to make it real.
> 

	I'd like to know your idea . In fact I feel there are not enough 
method in some of the classes , I am thinking about add more methods to some 
of classes in lib.

> Looking forward to hearing comment from you on this.
> 

ent time I don't think it is, its quality
> is quite poor compared with other parts any will build a office in
Beijing, China. They are interested in me to support their office. Now I am
thinking it over.
Status: ORr

I know the reason that you receive a lot of leaving message. They all go to
Chicago for an AICHE meeting. I think this week they will come back. You'd
better call them again. I want to know what they talk about with you?

talk to you later.
yale

============================================
 Zhang, Yale             
--------------------------------------------   
 Dept. of Automation   Tel: 8610-62783125   
 Tsinghua University   Fax: 8610-62562768   
 Beijing, P.R.China    Email:               
 100084                [email-masked] 
============================================