struct-based pointers and block size

From: Natalie Freed (Natalie.Freed_at_asu_dot_edu)
Date: Thu Jul 10 2008 - 12:57:54 PDT

  • Next message: Costin Iancu: "Re: struct-based pointers and block size"
    Hello,
    
    I built the Berkeley UPC compiler, v. 2.6.0 with the
    --disable-sptr-packed option.
    
    I get this message when I compile some of my programs:
    Maximum block size in this implementation is 1048576
    
    This is smaller than the default size for 64-bit systems without using
    struct-based pointers (I'm basing all this off the INSTALL document
    here http://upc.lbl.gov/download/dist/INSTALL). I'm working with some
    fairly large problem sizes and it would be a big help if I could scale
    the block sizes accordingly.
    
    Is there any advice you can give me? If this could be specific to my
    system or installation I will add any details, I'm not sure what's
    relevant here and I might be missing something more basic about how
    this option is intended to work.
    
    Thank you,
    Natalie
    
    P.S. For search reference this is the section I was looking at:
    
    http://upc.lbl.gov/download/dist/INSTALL
    
    'PACKED', 'UNPACKED', AND 'SYMMETRIC' SHARED POINTERS
    
       The Berkeley UPC runtime supports three different implementations for shared
       pointers: one which is implemented with a C structure, another 'packed' one
       which uses a 64 bit integral value to store all the fields in a shared
       pointer, and a 'symmetric' variant that optimizes an important class of
       shared pointers (those with either blocksize==1 or indefinite blocksize) by
       using regular C pointers (the packed representation is used for the general
       case).  The 'packed' implementation is the default, and should be best for
       most users.  Symmetric pointers currently require shared-memory semantics,
       and thus work only on certain machines with -network=shmem, and/or for
       programs compiled with '-network=smp' (i.e. no network) on any system
       supporting pthreads.  They generally provide the fastest performance on
       configurations that support them, but are currently still experimental.  To
       use them, pass '--enable-sptr-symmetric'.  Struct shared pointers are
       primarily useful for increasing the UPC_MAX_BLOCKSIZE supported by the
       implementation, and for debugging by the members of the Berkeley
    UPC effort (as
       they provide more type safety than the other versions).  To use them, pass
       '--disable-sptr-packed'.
    
       TRADING-OFF MAXIMUM 'THREADS', BLOCKSIZE, AND HEAP SIZE
    
       The default 'packed' shared pointer representation stores all the fields of a
       shared pointer (address, thread, and phase offset) in a single 64-bit integer
       type.  The limited number of bits forces each element to have a maximum
       value.  By default, 32 bit systems use 22 bits for the phase offset, 10 for
       the thread field, and 32 for the address field, resulting in a maximum
       blocksize of 4194304, a maximum of 1024 threads per application, and
       4 GB maximum of shared memory per thread,    The default for 64 bit systems
       are 20,10,34 bits, respectively, or 2097152 max blocksize/1024 threads/16 GB.
    
       You can adjust the number of bits that is assigned to each subfield of packed
       shared pointers at configure time, via the '--with-sptr-packed-bits' flag.
       The flag must be passed three comma-separated integers, representing the
       number of bits for the phase, thread, and address fields (in that order),
       with the total adding up to 64 bits.  For instance,
    
            --with-sptr-packed-bits=8,20,36
    
       limits the maximum number of threads to 256, but expands the maximum shared
       memory per thread to 64 GB.
    
       If you find that 64 bits is not enough to contain the maximum values you need
       for your system, pass '--disable-sptr-packed', and your UPC build will use
       'struct' based pointers, which are slower, but have larger maximum values.
    

  • Next message: Costin Iancu: "Re: struct-based pointers and block size"