Re: upc_threadof() inconsistency?

From: Reinhold Bader (bader-reinhold_at_t-online.de)
Date: Sun Apr 11 2010 - 15:10:41 PDT

  • Next message: Paul H. Hargrove: "Re: upc_threadof() inconsistency?"
    Hello Paul,
    
    Am 11.04.2010 23:40, schrieb Paul H. Hargrove:
    > Reinhold,
    >
    
    [...]
    
    > 
    > However, if I print ALL of a[][] then the result from Berkeley UPC does
    > appear to be incorrect.  The values printed appear to vary from run to
    > run, indicating a race condition, 
    
    Yes, I also observed these variations.
    
    > but the following entries are consistent:
    > 
    > a[0][0] is on thread 0 with value 0
    > a[1][0] is on thread 1 with value 0
    > a[2][0] is on thread 2 with value 0
    > a[3][0] is on thread 3 with value 1
    > ...
    > a[0][1] is on thread 1 with value 0
    > a[1][1] is on thread 2 with value 0
    > a[2][1] is on thread 3 with value 1
    > ...
    > a[0][2] is on thread 2 with value 0
    > a[1][2] is on thread 3 with value 1
    > 
    > This pattern suggests to me that the address computation on the write
    > and the read might not be the same, with a shifting taking place in one
    > or the other.
    > I will enter a bug report for this observed wrong behavior.
    
    Thanks.
    
    > 
    > So, I am certain that Berkeley UPC is producing an incorrect result.
    > However, I am afraid I am not able to know what the correct result
    > should be.
    
    Note that if I replace the declaration
    shared [*] int a[THREADS][3];
    by
    shared [3] int a[THREADS][3];
    (which I believe should be equivalent in this situation)
    the problem seems not to appear (neither the changing values nor the
    incorrect affinities).
    
    [...]
    
    Regards
    
    
    -- 
     Dr. Reinhold Bader
    
     Leibniz-Rechenzentrum, Abt. Hochleistungssysteme | Tel. +49 89 35831 8825
     Boltzmannstr. 1, 85748 Garching                  | Fax  +49 89 35831 9700
    

  • Next message: Paul H. Hargrove: "Re: upc_threadof() inconsistency?"