upc question

From: chenhu1982 ([email protected])
Date: Tue Sep 05 2006 - 01:41:08 PDT

  • Next message: jagan jagan: "About UPC"
    Dear Sir:
    
        When I Compile this program, I get error
    informations.But,this program is an example in
    upc_tutorial_sp06.pdf,which I download from
    http://upc.nersc.gov/publications/.
    
        Would you tell me how to handle this error? Thank you very much
    
     #include <stdio.h>
    
    #include <upc_relaxed.h>
    
    shared [THREADS] int a[THREADS][THREADS];
    
    shared int b[THREADS],c[THREADS];
    
    
    
    int main()
    
    {
    
            int i,j,l;
    
          /*
    
                Init a,b
    
         */
    
          upc_forall(i=0;i<THREADS;i++;i)
    
            {
    
                    c[i]=0;
    
                    for(l=0;l<THREADS;l++)
    
                           
    c[i]+=a[i][l]*b[l];
    
            }
    
    }
    
    
    
    -----------error information--------
    
    
    
    Block Size is not a compile time constant
    
    In the dynamic translation environment, THREADS may not be referenced more than once in a shared array declaration.
    

  • Next message: jagan jagan: "About UPC"