Re: Clock synchronization among threads in BUPC

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Dec 21 2009 - 20:22:41 PST

  • Next message: Andreev Nikita: "UPC with Sun backend compiler"
    The tracing output produced by the -trace option to uprun uses 
    independent clocks.  They are not synchronized, but since each tread 
    expresses its clock in terms of seconds from the beginning of execution 
    they begin "nearly" synchronized.  There is no mechanism in place to get 
    the "start of time" to be identical across nodes, nor to ensure that the 
    clock rates do not suffer from any drift.
    
    -Paul
    
    Andreev Nikita wrote:
    > Paul,
    >
    > BUPC supports simple performance tracking (upcc -trace option that
    > enables communication tracing & statistics for use with upc_trace). It
    > makes sense that you needed to include some mechanism to do clock
    > synchronization. Dan even had a discussion with Adam from PPW team
    > about this (see the discussion at
    > http://bugzilla.hcs.ufl.edu/cgi-bin/bugzilla3/show_bug.cgi?id=36).
    >
    > Where am I wrong?
    >
    > Nikita
    >
    >   
    >> Nikita,
    >>     
    >
    >   
    >> Hopefully somebody will correct me if I am wrong, but as I understand 
    >> the text you quote the synchronization algorithm is implemented in 
    >> Parallel Performance Wizard v2.2.  We have discussed global clock 
    >> synchronization within the Berkeley UPC runtime, but have never 
    >> implemented it there.
    >>     
    >
    >   
    >> Happy Holidays,
    >> -Paul
    >>     
    >
    >   
    >> Andreev Nikita wrote:
    >>     
    >>> Hello guys,
    >>>
    >>> I am working on tracing UPC applications through GASP interface. To
    >>> order resulting events from all threads I need to somehow synhronize
    >>> time among them.
    >>>
    >>> One way is to use NTP and gettimeofday (global timer). Then I can
    >>> simply substract timestamp of the earliest event from all other
    >>> timestamps to obtain relative time. But NTP itself is most likely not
    >>> enough accurate for that task. (Can somebody confirm or deny that?)
    >>>
    >>> There is high-precision wall-clock timer support in Berkeley UPC. But
    >>> as I understand bupc_ticks_now(), bupc_ticks_to_us() and
    >>> bupc_ticks_to_ns() give me relative thread times. And I can't find any
    >>> way to synchronize them.
    >>>
    >>> Parallel Performance Wizard v2.2 Developer's Guide says:
    >>> "The UPC and SHMEM language-depending implementations also include a
    >>> simple clock synchronization that is based on F. Cristian's paper
    >>> entitled �A Probabilistic Approach to Distributed Clock
    >>> Synchronization� which has been modified to use one-sided
    >>> communications. The global clock synchronization algorithm is
    >>> essentially remote clock reading and is very simple, but effective,
    >>> and is used to adjust timestamps on trace records during the merge
    >>> phase."
    >>>
    >>> How is it implemented in Berkeley UPC and how can I utilize it?
    >>>
    >>> Happy Christmas and New Year!
    >>>
    >>> Nikita
    >>>
    >>>
    >>>
    >>>   
    >>>       
    >
    >
    >
    >
    >   
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    

  • Next message: Andreev Nikita: "UPC with Sun backend compiler"